class Thanos::API::Client

Constants

API_ENDPOINT
API_VERSION

Public Instance Methods

authentication() click to toggle source
# File lib/thanos/api/client.rb, line 21
def authentication
  Authentication.get
end
endpoint() click to toggle source
# File lib/thanos/api/client.rb, line 17
def endpoint
  "#{API_ENDPOINT}/#{API_VERSION}/public"
end
get(resource, options) click to toggle source
# File lib/thanos/api/client.rb, line 11
def get(resource, options)
  url = "#{endpoint}/#{resource}"
  response = RestClient.get(url, params: options.merge(authentication))
  Thanos::API::Response.new(response)
end