Module: OpenWeather::Endpoints::Hourly
- Included in:
- Client
- Defined in:
- lib/open_weather/endpoints/hourly.rb
Instance Method Summary collapse
Instance Method Details
#hourly(lat, lon = nil, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/open_weather/endpoints/hourly.rb', line 6 def hourly(lat, lon = nil, = {}) # default to the pro endpoint if not specified endpoint = .delete(:endpoint) || pro_endpoint = .merge(endpoint: endpoint) = lat.is_a?(Hash) ? .merge(lat) : .merge(lat: lat, lon: lon) OpenWeather::Models::Forecast::Hourly.new(get('2.5/forecast/hourly', ), ) end |