Class: Customerio::BaseClient
- Inherits:
-
Object
- Object
- Customerio::BaseClient
- Defined in:
- lib/customerio/base_client.rb
Instance Method Summary collapse
-
#initialize(auth, options = {}) ⇒ BaseClient
constructor
A new instance of BaseClient.
- #request(method, path, body = nil, headers = {}) ⇒ Object
- #request_and_verify_response(method, path, body = nil, headers = {}) ⇒ Object
Constructor Details
#initialize(auth, options = {}) ⇒ BaseClient
Returns a new instance of BaseClient.
21 22 23 24 25 |
# File 'lib/customerio/base_client.rb', line 21 def initialize(auth, = {}) @auth = auth @timeout = [:timeout] || DEFAULT_TIMEOUT @base_uri = [:url] end |
Instance Method Details
#request(method, path, body = nil, headers = {}) ⇒ Object
27 28 29 |
# File 'lib/customerio/base_client.rb', line 27 def request(method, path, body = nil, headers = {}) execute(method, path, body, headers) end |
#request_and_verify_response(method, path, body = nil, headers = {}) ⇒ Object
31 32 33 |
# File 'lib/customerio/base_client.rb', line 31 def request_and_verify_response(method, path, body = nil, headers = {}) verify_response(request(method, path, body, headers)) end |