Sha256: f0b9fd72466d191574bf667d9cdf6bb0947d9e3894fb6f541a26d488ac09eed4

Contents?: true

Size: 887 Bytes

Versions: 1

Compression:

Stored size: 887 Bytes

Contents

module CoinMarketCap
  module Resources
    class Listing < Resource
      property 'id'
      property 'name'
      property 'symbol'
      property 'slug'
      property 'is_active'
      property 'is_fiat'
      property 'cmc_rank'
      property 'num_market_pairs'
      property 'circulating_supply'
      property 'total_supply'
      property 'market_cap_by_total_supply'
      property 'max_supply'
      property 'last_updated', transform_with: ->(v) { iso8601_date(v) }
      property 'date_added', transform_with: ->(v) { iso8601_date(v) }
      property 'tags'
      property 'platform', transform_with: lambda { |v|
        CoinMarketCap::Resources::Platform.new(v) unless v.nil?
      }
      property 'quote', transform_with: lambda { |v|
        v.map do |key, value|
          [key, CoinMarketCap::Resources::Quote.new(value)]
        end.to_h
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
coinmarketcap-ruby-client-1.1.1 lib/coinmarketcap/resources/listing.rb