module Finnhub::Calendar

Public Instance Methods

earnings_calendar(from: nil, to: nil) click to toggle source
# File lib/Calendar.rb, line 7
def earnings_calendar(from: nil, to: nil)
  url = "/calendar/earnings?"
  from = from.to_date.to_s if from.is_a?(Time)
  url += "&from=#{from}" unless from.nil?
  to = to.to_date.to_s if to.is_a?(Time)
  url += "&to=#{to}" unless to.nil?
  url[-1] = "" if url[-1] == "?"
  request(url)
end
economic_calendar() click to toggle source
# File lib/Calendar.rb, line 3
def economic_calendar
  request("/calendar/economic")
end
ico_calendar() click to toggle source
# File lib/Calendar.rb, line 21
def ico_calendar
  request("/calendar/ico")
end
ipo_calendar() click to toggle source
# File lib/Calendar.rb, line 17
def ipo_calendar
  request("/calendar/ipo")
end