Sha256: fc8310b5708eb66aa129bc4c2bf497ca7aaf57a73b1f9c5f5b053112a94847d3

Contents?: true

Size: 488 Bytes

Versions: 47

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

require 'httparty'

module EodFacade
  class Base
    class << self
      def make_request(url_path, params = {})
        HTTParty.get(full_url(url_path),
                     query: params.merge(
                       api_token: EodFacade::Constants.api_key
                     ),
                     format: :json)
      end

      private

      def full_url(url_path)
        "#{EodFacade::Constants.base_url}#{url_path}"
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
sensei_eod_utils-0.0.53 lib/eod_facade/base.rb
sensei_eod_utils-0.0.52 lib/eod_facade/base.rb
sensei_eod_utils-0.0.51 lib/eod_facade/base.rb
sensei_eod_utils-0.0.50 lib/eod_facade/base.rb
sensei_eod_utils-0.0.49 lib/eod_facade/base.rb
sensei_eod_utils-0.0.48 lib/eod_facade/base.rb
sensei_eod_utils-0.0.47 lib/eod_facade/base.rb
sensei_eod_utils-0.0.46 lib/eod_facade/base.rb
sensei_eod_utils-0.0.45 lib/eod_facade/base.rb
sensei_eod_utils-0.0.44 lib/eod_facade/base.rb
sensei_eod_utils-0.0.43 lib/eod_facade/base.rb
sensei_eod_utils-0.0.42 lib/eod_facade/base.rb
sensei_eod_utils-0.0.41 lib/eod_facade/base.rb
sensei_eod_utils-0.0.40 lib/eod_facade/base.rb
sensei_eod_utils-0.0.39 lib/eod_facade/base.rb
sensei_eod_utils-0.0.38 lib/eod_facade/base.rb
sensei_eod_utils-0.0.37 lib/eod_facade/base.rb
sensei_eod_utils-0.0.36 lib/eod_facade/base.rb
sensei_eod_utils-0.0.35 lib/eod_facade/base.rb
sensei_eod_utils-0.0.34 lib/eod_facade/base.rb