TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/OdintheDoggo/GodotNWS/llms.txt
Use this file to discover all available pages before exploring further.
Nws singleton provides two forecast methods: a daily forecast that groups weather into named periods (such as “Tonight” or “Tuesday”) and an hourly forecast that covers each hour individually. Both methods are asynchronous and return their data through a signal. location_setup_complete must have fired before calling either method.
Daily Forecast
fetch_forecast(fetch_images: bool)
Fetches the daily forecast for the configured location and emits forecast_fetched with an array of ForecastPeriod resources. The NWS daily forecast typically covers seven days, broken into day and night periods.
When
true, the icon image for each forecast period is downloaded and stored in ForecastPeriod.icon as an ImageTexture. The signal fires only after all icon images have loaded. When false, ForecastPeriod.icon is null but ForecastPeriod.iconUrl is still populated, allowing you to load images later on demand.Signal: forecast_fetched(periods: Array[ForecastPeriod])
Emitted when the daily forecast data — and all icon images, if requested — is ready.
An array of
ForecastPeriod resources, one per forecast period. Each resource exposes the following fields:When
fetch_images is true, icon downloads are asynchronous. The signal fires after all icons are loaded, but the periods array may not be in chronological order. Sort by ForecastPeriod.number to restore the correct sequence.Code Example
Hourly Forecast
fetch_hourly_forecast(fetch_images: bool)
Fetches the hourly forecast for the configured location and emits hourly_forecast_fetched with an array of HourlyForecastPeriod resources. The NWS hourly forecast typically covers the next 156 hours (six and a half days).
When
true, the icon image for each hourly period is downloaded and stored in HourlyForecastPeriod.icon. The signal fires only after all icons have loaded. When false, HourlyForecastPeriod.icon is null but iconUrl is still set.Signal: hourly_forecast_fetched(periods: Array[HourlyForecastPeriod])
Emitted when the hourly forecast data — and all icon images, if requested — is ready.
An array of
HourlyForecastPeriod resources, one per hour. Each resource exposes the following fields:When
fetch_images is true, sort results by HourlyForecastPeriod.number after receiving the signal, as concurrent image downloads may reorder the array.