Method: Weatherb::API#daily
- Defined in:
- lib/weatherb/api.rb
#daily(lat:, lon:, unit_system: 'si', start_time: 'now', end_time: nil, fields: DEFAULT_FIELDS | DEFAULT_DAILY_FIELDS) ⇒ Hash
Daily (<= 15d out) The daily API call provides a global daily forecast with summaries up to 15 days out.
Note Daily results are returned and calculated based on 6am to 6am periods (meteorological timeframe) in UTC (GMT+0). Therefore, requesting forecast for locations with negative GMT offset may provide the first element with yesterday’s date.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/weatherb/api.rb', line 190 def daily(lat:, lon:, unit_system: 'si', start_time: 'now', end_time: nil, fields: DEFAULT_FIELDS | DEFAULT_DAILY_FIELDS) path = 'weather/forecast/daily' query = { apikey: @api_key, lat: lat, lon: lon, unit_system: unit_system, start_time: start_time, end_time: end_time, fields: fields } response = @connection.get(path, query) response_body(response) end |