Class: SynapsePayRest::CryptoQuotes
- Inherits:
-
Object
- Object
- SynapsePayRest::CryptoQuotes
- Defined in:
- lib/synapse_pay_rest/api/crypto_quotes.rb
Overview
Wrapper class for /client endpoint
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#get ⇒ Hash
Sends a GET request to /crypto-quotes endpoint to get btc exchange rate and returns the response.
-
#initialize(client) ⇒ CryptoQuotes
constructor
A new instance of CryptoQuotes.
Constructor Details
#initialize(client) ⇒ CryptoQuotes
Returns a new instance of CryptoQuotes.
10 11 12 |
# File 'lib/synapse_pay_rest/api/crypto_quotes.rb', line 10 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ SynapsePayRest::HTTPClient
7 8 9 |
# File 'lib/synapse_pay_rest/api/crypto_quotes.rb', line 7 def client @client end |
Instance Method Details
#get ⇒ Hash
Sends a GET request to /crypto-quotes endpoint to get btc exchange rate and returns the response.
HTTP response from API
23 24 25 26 |
# File 'lib/synapse_pay_rest/api/crypto_quotes.rb', line 23 def get() path = '/nodes/crypto-quotes' client.get(path) end |