Sha256: 2cb3b42034b929ab7a34bea922a11097c793a235b624a86acdb92667a6034895

Contents?: true

Size: 475 Bytes

Versions: 20

Compression:

Stored size: 475 Bytes

Contents

# frozen_string_literal: true

module EodFacade
  class Eod < ::EodFacade::Base
    class << self
      def call(symbol, params = {})
        response = make_request(url_path(symbol), params.merge(fmt: 'json'))

        unless response.success?
          raise ArgumentError, "Error fetching end of day data for #{symbol}"
        end

        response.parsed_response
      end

      private

      def url_path(symbol)
        "/eod/#{symbol}"
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
sensei_eod_utils-0.0.31 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.30 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.29 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.28 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.27 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.26 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.25 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.24 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.23 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.22 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.21 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.20 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.19 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.17 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.16 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.15 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.14 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.13 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.12 lib/eod_facade/eod.rb
sensei_eod_utils-0.0.11 lib/eod_facade/eod.rb