Class: Polygon::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/client.rb

Instance Method Summary collapse

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