Class: GetResponseApi::Client
- Inherits:
-
Object
- Object
- GetResponseApi::Client
- Defined in:
- lib/get_response_api/client.rb
Instance Method Summary collapse
- #account ⇒ Object
- #campaigns(page: 1, per_page: 250) ⇒ Object
- #custom_fields ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
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
#account ⇒ Object
7 8 9 |
# File 'lib/get_response_api/client.rb', line 7 def account @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_fields ⇒ Object
15 16 17 |
# File 'lib/get_response_api/client.rb', line 15 def custom_fields @connection.request(:get, '/custom-fields') end |