Sha256: dace3ea614ba52dd3d366f994e9e0538e028273c0248a773ff6cab3eadab8f70

Contents?: true

Size: 465 Bytes

Versions: 10

Compression:

Stored size: 465 Bytes

Contents

module IEX
  module Endpoints
    module Sectors
      def sectors(symbol, options = {})
        get([
          'stock',
          symbol,
          'sector-performance'
        ].compact.join('/'), { token: publishable_token }.merge(options)).map do |data|
          IEX::Resources::Sectors.new(data)
        end
      rescue Faraday::ResourceNotFound => e
        raise IEX::Errors::SymbolNotFoundError.new(symbol, e.response[:body])
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
iex-ruby-client-2.1.0 lib/iex/endpoints/sectors.rb
iex-ruby-client-2.0.0 lib/iex/endpoints/sectors.rb
iex-ruby-client-1.6.0 lib/iex/endpoints/sectors.rb
iex-ruby-client-1.5.0 lib/iex/endpoints/sectors.rb
iex-ruby-client-1.4.1 lib/iex/endpoints/sectors.rb
iex-ruby-client-1.4.0 lib/iex/endpoints/sectors.rb
iex-ruby-client-1.3.0 lib/iex/endpoints/sectors.rb
iex-ruby-client-1.2.0 lib/iex/endpoints/sectors.rb
iex-ruby-client-1.1.2 lib/iex/endpoints/sectors.rb
iex-ruby-client-1.1.1 lib/iex/endpoints/sectors.rb