Class: GetResponseApi::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/get_response_api/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_key) ⇒ Client

Returns a new instance of Client.



3
4
5
# File 'lib/get_response_api/client.rb', line 3

def initialize(api_key)
  @connection = Connection.new(api_key)
end

Instance Method Details

#accountObject



7
8
9
# File 'lib/get_response_api/client.rb', line 7

def 
  @connection.request(:get, '/accounts')
end

#campaigns(page: 1, per_page: 250) ⇒ Object



11
12
13
# File 'lib/get_response_api/client.rb', line 11

def campaigns(page: 1, per_page: 250)
  @connection.request(:get, "/campaigns?page=#{page}&perPage=#{per_page}")
end

#custom_fieldsObject



15
16
17
# File 'lib/get_response_api/client.rb', line 15

def custom_fields
  @connection.request(:get, '/custom-fields')
end