Sha256: 86684304ee511a018cc12841f7caa0cde488234c83e060f50322efccb46b6e42

Contents?: true

Size: 1.26 KB

Versions: 4

Compression:

Stored size: 1.26 KB

Contents

module IEX
  module Api
    extend Config::Client::Accessor
    extend Config::Logger::Accessor

    class Client
      include Endpoints::AdvancedStats
      include Endpoints::BalanceSheet
      include Endpoints::CashFlow
      include Endpoints::Chart
      include Endpoints::Company
      include Endpoints::Crypto
      include Endpoints::Dividends
      include Endpoints::Earnings
      include Endpoints::FX
      include Endpoints::HistoricalPrices
      include Endpoints::Income
      include Endpoints::KeyStat
      include Endpoints::KeyStats
      include Endpoints::LargestTrades
      include Endpoints::Logo
      include Endpoints::News
      include Endpoints::Ohlc
      include Endpoints::Price
      include Endpoints::Quote
      include Endpoints::Sectors
      include Endpoints::RefData
      include Endpoints::StockMarket

      include Cloud::Connection
      include Cloud::Request

      attr_accessor(*Config::Client::ATTRIBUTES)

      attr_reader :logger

      def initialize(options = {})
        Config::Client::ATTRIBUTES.each do |key|
          send("#{key}=", options[key] || IEX::Api.config.send(key))
        end
        @logger = Config::Logger.dup
        @logger.instance = options[:logger] if options.key?(:logger)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iex-ruby-client-2.1.0 lib/iex/api/client.rb
iex-ruby-client-2.0.0 lib/iex/api/client.rb
iex-ruby-client-1.6.0 lib/iex/api/client.rb
iex-ruby-client-1.5.0 lib/iex/api/client.rb