Sha256: c73b94be9a0e6a88c008bcec9eabc63194bec4cd63997a4c7a5a9932423fe1a0

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

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

    class Client
      include Endpoints::AdvancedStats
      include Endpoints::Chart
      include Endpoints::Company
      include Endpoints::Crypto
      include Endpoints::Dividends
      include Endpoints::Earnings
      include Endpoints::Income
      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

1 entries across 1 versions & 1 rubygems

Version Path
iex-ruby-client-1.3.0 lib/iex/api/client.rb