pub struct WeatherSubApiInput {
pub api: NeaWeatherSubApi,
pub date: Option<Date>,
pub pagination_token: Option<String>,
pub x_api_key: Option<String>,
}Expand description
Unified weather sub-API endpoint.
-
?api=lightning— Cloud-to-ground and cloud-to-cloud lightning strikes. Updated every ~2–3 minutes. -
?api=wbgt— Wet Bulb Globe Temperature heat stress readings. Updated every 15 minutes.
https://api-open.data.gov.sg/v2/real-time/api/weather?api=lightning
-
Updated multiple times throughout the day
-
Filter for a specific date by providing
datein query parameter (YYYY-MM-DD). -
example:
?date=2025-01-16 -
If
dateis not provided in query parameter, API will return the latest lightning observation
Fields§
§api: NeaWeatherSubApiSub-API selector (lightning or wbgt). Required.
date: Option<Date>SGT date for which to retrieve data (YYYY-MM-DD). Omit for latest.
pagination_token: Option<String>Pagination token for subsequent pages (only when date filter is used and more pages exist).
x_api_key: Option<String>Optional API key for higher rate limits.
Implementations§
Trait Implementations§
Source§impl Clone for WeatherSubApiInput
impl Clone for WeatherSubApiInput
Source§fn clone(&self) -> WeatherSubApiInput
fn clone(&self) -> WeatherSubApiInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more