Sha256: 4aa3e9eaed9d6d02b9474d4dae75b4fd2c5d2918e35c98042b252e9b814b8857
Contents?: true
Size: 667 Bytes
Versions: 2
Compression:
Stored size: 667 Bytes
Contents
# frozen_string_literal: true module CoinMarketCapitalization # Content class - contains methods that map to API endpoints for content data. # This category currently includes 4 endpoints class Content < Base BASE_URL = "https://pro-api.coinmarketcap.com/v1/content" END_POINT_ENTRIES = %w[ latest posts/top posts/latest posts/comments ].freeze def initialize(api_key:, base_url: BASE_URL, adapter: Faraday.default_adapter) super end END_POINT_ENTRIES.each do |end_point| define_method(end_point.tr("/-", "_").to_sym) do |**args| make_request(end_point, **args) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
coin_market_capitalization-0.1.2 | lib/coin_market_capitalization/content.rb |
coin_market_capitalization-0.1.1 | lib/coin_market_capitalization/content.rb |