class CryptoMarket::Api
Public Class Methods
api_call()
click to toggle source
# File lib/crypto_market/api.rb, line 3 def self.api_call url = URI('https://api.coinmarketcap.com/v1/ticker/') response = Net::HTTP.get(url) JSON.parse(response) end
fetch_coin_data()
click to toggle source
# File lib/crypto_market/api.rb, line 9 def self.fetch_coin_data api_call.reject do |coin, _| coin.any? do |_, attribute_value| attribute_value == '?' || attribute_value.nil? end end end