Class: Darwinex::Api::Api
- Inherits:
-
Object
- Object
- Darwinex::Api::Api
- Includes:
- HTTParty
- Defined in:
- lib/darwinex/api/api.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(logger) ⇒ Api
constructor
A new instance of Api.
- #send(http_method, path, options, max_retries:) ⇒ Object
Constructor Details
#initialize(logger) ⇒ Api
Returns a new instance of Api.
12 13 14 |
# File 'lib/darwinex/api/api.rb', line 12 def initialize(logger) @logger = logger end |
Instance Method Details
#send(http_method, path, options, max_retries:) ⇒ Object
16 17 18 19 20 |
# File 'lib/darwinex/api/api.rb', line 16 def send(http_method, path, , max_retries:) response = backoff_and_retry(http_method, path, , max_retries: max_retries) response.parsed_response end |