class SynapsePayRest::CryptoQuotes

Wrapper class for /client endpoint

Attributes

client[RW]

@!attribute [rw] client

@return [SynapsePayRest::HTTPClient]

Public Class Methods

new(client) click to toggle source

@param client [SynapsePayRest::HTTPClient]

# File lib/synapse_pay_rest/api/crypto_quotes.rb, line 10
def initialize(client)
  @client = client
end

Public Instance Methods

get() click to toggle source

Sends a GET request to /crypto-quotes endpoint to get btc exchange rate and returns the response.

@param scope [String]

@raise [SynapsePayRest::Error] may return subclasses of error based on HTTP response from API

@return [Hash] API response

# File lib/synapse_pay_rest/api/crypto_quotes.rb, line 23
def get()
  path = '/nodes/crypto-quotes'
  client.get(path)
end