Class: Polygon::Client
- Inherits:
-
Object
- Object
- Polygon::Client
- Defined in:
- lib/client.rb
Instance Method Summary collapse
- #grouped_daily(date) ⇒ Object
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
- #single_daily(ticker, date) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/client.rb', line 5 def initialize(api_key) @api_key = api_key end |
Instance Method Details
#grouped_daily(date) ⇒ Object
9 10 11 |
# File 'lib/client.rb', line 9 def grouped_daily(date) ::HTTParty.get("#{grouped_daily_endpoint}/#{formatted_date(date)}#{api_query_string}") end |
#single_daily(ticker, date) ⇒ Object
13 14 15 |
# File 'lib/client.rb', line 13 def single_daily(ticker, date) ::HTTParty.get("#{single_daily_endpoint}/#{ticker}/#{formatted_date(date)}#{api_query_string}") end |