Class: Eyeofsatoshi::Coingecko
- Inherits:
-
Base
- Object
- Base
- Eyeofsatoshi::Coingecko
show all
- Defined in:
- lib/coingecko.rb
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#parsed_response(response) ⇒ Object
7
8
9
|
# File 'lib/coingecko.rb', line 7
def parsed_response(response)
response.dig('tickers').first.dig('last').to_f
end
|
#request ⇒ Object
3
4
5
|
# File 'lib/coingecko.rb', line 3
def request
super(:get, url)
end
|
#url ⇒ Object
11
12
13
|
# File 'lib/coingecko.rb', line 11
def url
"https://api.coingecko.com/api/v3/coins/#{options[:name]}"
end
|