class FroyoApi::Client
Public Instance Methods
request(path)
click to toggle source
# File lib/froyo_api/client.rb, line 6 def request(path) options = params(path) RestClient::Request.execute(options) do |response, request| JSON.parse(response.body) end end
Private Instance Methods
headers()
click to toggle source
# File lib/froyo_api/client.rb, line 15 def headers { accept: 'application/vnd.collection.doc+json' } end
params(path)
click to toggle source
# File lib/froyo_api/client.rb, line 21 def params(path) { method: :get, url: "#{FroyoApi::URL}/#{path}", headers: headers } end