Class: PipelineDealsApi::Client

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pipeline_deals_api/client.rb

Overview

NOTE(asinner): The Client class is responsible for giving you an object for communicating with the API.

To create a new client call the Client class constructor and pass your credentials using named parameters:

“‘ client = PipelineDealsApi::Client.new(api_key: ’your-api-key’) “‘ If you have an `app_key` token you may also pass that in addition to your `api_key`

“‘ client = PipelineDealsApi::Client.new(

api_key: 'your-api-key',
app_key: 'your-app-key'

) “‘

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key:, app_key: nil) ⇒ Client

Returns a new instance of Client.



30
31
32
33
34
35
36
37
# File 'lib/pipeline_deals_api/client.rb', line 30

def initialize(api_key:, app_key: nil)
  @credentials = Credentials.new(
    api_key: api_key,
    app_key: app_key
  )
  init_config
  init_clients
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



22
23
24
# File 'lib/pipeline_deals_api/client.rb', line 22

def credentials
  @credentials
end