class Recomiendo::Client
Public Class Methods
new(key, secret)
click to toggle source
# File lib/recomiendo/client.rb, line 11 def initialize(key, secret) @auth = { username: key, password: secret } end
Public Instance Methods
accounts()
click to toggle source
# File lib/recomiendo/client.rb, line 31 def accounts Recomiendo::Account.new(self) end
delete(path)
click to toggle source
# File lib/recomiendo/client.rb, line 23 def delete(path) self.class.delete(path, basic_auth: @auth) end
get(path, params)
click to toggle source
# File lib/recomiendo/client.rb, line 19 def get(path, params) self.class.get(path, query: params, basic_auth: @auth) end
links()
click to toggle source
# File lib/recomiendo/client.rb, line 35 def links Recomiendo::Link.new(self) end
post(path, params)
click to toggle source
# File lib/recomiendo/client.rb, line 15 def post(path, params) self.class.post(path, body: params, basic_auth: @auth) end
put(path, params)
click to toggle source
# File lib/recomiendo/client.rb, line 27 def put(path, params) self.class.put(path, body: params, basic_auth: @auth) end
rewards()
click to toggle source
# File lib/recomiendo/client.rb, line 39 def rewards Recomiendo::Reward.new(self) end