class Marver::API::Client
Constants
- API_ENDPOINT
- API_VERSION
Public Instance Methods
credentials()
click to toggle source
# File lib/marver/api/client.rb, line 25 def credentials Credentials.get end
endpoint()
click to toggle source
# File lib/marver/api/client.rb, line 21 def endpoint "#{API_ENDPOINT}/#{API_VERSION}/public" end
get(entity, options)
click to toggle source
# File lib/marver/api/client.rb, line 10 def get(entity, options) url = "#{endpoint}/#{entity.to_s}" json = RestClient.get url, { params: options.merge(credentials) } Marver::API::Response.new(json) end
get_uri(uri)
click to toggle source
# File lib/marver/api/client.rb, line 16 def get_uri(uri) response = RestClient.get uri, { params: credentials } Marver::API::Response.new(response) end