Class: Kasabi::Attribution

Inherits:
BaseClient show all
Defined in:
lib/kasabi/api/attribution.rb

Instance Attribute Summary

Attributes inherited from BaseClient

#apikey, #client, #endpoint

Instance Method Summary collapse

Methods inherited from BaseClient

#client_options, #get, #post, #validate_response

Constructor Details

#initialize(endpoint, options = {}) ⇒ Attribution

Initialize the attribution client to work with a specific endpoint

The options hash can contain the following values:

  • :apikey: required. apikey authorized to use the API

  • :client: HTTPClient object instance



10
11
12
# File 'lib/kasabi/api/attribution.rb', line 10

def initialize(endpoint, options={})
  super(endpoint, options)
end

Instance Method Details

#get_attributionObject



14
15
16
17
18
# File 'lib/kasabi/api/attribution.rb', line 14

def get_attribution()
  response = get(@endpoint)
  validate_response(response)
  return JSON.parse( response.content )        
end