Class: Capwatch::CoinMarketCap

Inherits:
Object
  • Object
show all
Defined in:
lib/capwatch/coinmarketcap.rb

Constant Summary collapse

URL =
'https://api.coinmarketcap.com/v1/ticker/'.freeze

Class Method Summary collapse

Class Method Details

.fetchObject



7
8
9
10
# File 'lib/capwatch/coinmarketcap.rb', line 7

def self.fetch
  response = open(URL).read
  JSON.parse response
end