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.
24 25 26 27 28 |
# File 'lib/customerio/base_client.rb', line 24 def initialize(auth, = {}) @auth = auth @timeout = [:timeout] || DEFAULT_TIMEOUT @base_uri = [:url] end |
Instance Method Details
#request(method, path, body = nil, headers = {}) ⇒ Object
30 31 32 |
# File 'lib/customerio/base_client.rb', line 30 def request(method, path, body = nil, headers = {}) execute(method, path, body, headers) end |
#request_and_verify_response(method, path, body = nil, headers = {}) ⇒ Object
34 35 36 |
# File 'lib/customerio/base_client.rb', line 34 def request_and_verify_response(method, path, body = nil, headers = {}) verify_response(request(method, path, body, headers)) end |