Class: Crypto::Listing
Constant Summary collapse
- MINUTES =
15
- BASE_IMG_URL =
'https://s2.coinmarketcap.com/static/img/coins/64x64'
Class Method Summary collapse
-
.info ⇒ Object
rubocop: disable Metrics/MethodLength, Lint/MissingCopEnableDirective.
Methods inherited from Base
binance?, coinex?, load_fixture, test
Class Method Details
.info ⇒ Object
rubocop: disable Metrics/MethodLength, Lint/MissingCopEnableDirective
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/crypto/resources/listing.rb', line 18 def info return test('crypto_listing.json') if Crypto.testing payload = detail if status?(payload) news = [] announcements(payload).each do |announcement| next unless correct_time?(announcement['date_added']) news.append(formatting(announcement)) end correct(news) else error(payload) end end |