Sha256: f43ee765d98351c89e2f57b8c64351509f49dc17dd92b9a16ae1652ee4242497

Contents?: true

Size: 702 Bytes

Versions: 1

Compression:

Stored size: 702 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/logo'
require_relative 'api/key_stats'
require_relative 'api/news'
require_relative 'api/ohlc'
require_relative 'api/price'
require_relative 'api/quote'

Version data entries

1 entries across 1 versions & 1 rubygems

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