Sha256: 8023f284cab971a052c34a9d919ddf20d52b8fc97b3cf3c6b00f7630cd238ae1

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 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/quote'
require_relative 'api/company'
require_relative 'api/price'
require_relative 'api/news'
require_relative 'api/chart'
require_relative 'api/ohlc'

Version data entries

1 entries across 1 versions & 1 rubygems

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