Class: Gera::BitfinexFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/gera/bitfinex_fetcher.rb

Constant Summary collapse

API_URL =
'https://api.bitfinex.com/v1/pubticker/'

Instance Method Summary collapse

Instance Method Details

#performObject



15
16
17
18
19
20
# File 'lib/gera/bitfinex_fetcher.rb', line 15

def perform
  response = RestClient::Request.execute url: url, method: :get, verify_ssl: false

  raise response.code unless response.code == 200
  JSON.parse response.body
end