Method: Weatherb::API#realtime
- Defined in:
- lib/weatherb/api.rb
#realtime(lat:, lon:, unit_system: 'si', fields: DEFAULT_FIELDS | DEFAULT_REALTIME_FIELDS) ⇒ Hash
Realtime (<= 1min out) The realtime call provides observational data at the present time, down to the minute, for a specific location. Information is available globally, with high-resolution data available for Japan Western Europe, India, and the US.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/weatherb/api.rb', line 93 def realtime(lat:, lon:, unit_system: 'si', fields: DEFAULT_FIELDS | DEFAULT_REALTIME_FIELDS) path = 'weather/realtime' query = { apikey: @api_key, lat: lat, lon: lon, unit_system: unit_system, fields: fields } response = @connection.get(path, query) response_body(response) end |