Sha256: 1401f70423d5beb21f60ddb561c106e3882f9d200e77c9097318c47f6b44baa5

Contents?: true

Size: 833 Bytes

Versions: 1

Compression:

Stored size: 833 Bytes

Contents

module IEX
  module Api
    ROOT_URI = 'https://api.iextrading.com/1.0/stock'.freeze

    def self.default_connection(path)
      Faraday.new(
        url: "#{ROOT_URI}/#{path}",
        request: {
          params_encoder: Faraday::FlatParamsEncoder
        }
      ) do |c|
        c.use ::FaradayMiddleware::ParseJson
        c.use Faraday::Response::RaiseError
        c.use Faraday::Adapter::NetHttp
      end
    end
  end
end

require_relative 'api/chart'
require_relative 'api/company'
require_relative 'api/dividends'
require_relative 'api/earnings'
require_relative 'api/largest_trades'
require_relative 'api/logo'
require_relative 'api/key_stats'
require_relative 'api/news'
require_relative 'api/ohlc'
require_relative 'api/price'
require_relative 'api/quote'
require_relative 'api/sectors'
require_relative 'api/crypto'

Version data entries

1 entries across 1 versions & 1 rubygems

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