Repository navigation
Adds forecast_15minutely() for /api/v1/forecast/15minutely: up to 12 steps of 15 minutes, returned as FifteenMinuteForecast. With dataset="full" each step also carries the precipitation type and snow rate.
observation_latest(precipitation="latest") asks the station for its latest precipitation accumulations (prec=1). They arrive in Observation.precipitation as ObservedPrecipitation items, one per period the station reports (1h, 3h, 6h, 12h or 24h).
observation_latest(precipitation="hourly") asks for the past day's one-hour accumulations (prec=2). They arrive in Observation.hourly_precipitation as ObservedHourlyPrecipitation items with endtime, accum and prectype (rain, sleet, snow, hail, icing or undefined), and Observation.latest_hourly_precipitation returns the most recent hour. A station can skip hours, so the list can hold fewer than 24 items.
Without the option, the request and the result are unchanged, except that both lists are empty.
current(), observation_latest(), forecast_hourly(), forecast_daily() and forecast_15minutely() take a keyword-only rounding. The API rounds most values to whole numbers by default; rounding=0 returns decimals, for example a wind speed of 4.53 m/s instead of 5. Leaving it out sends nothing, so the API's default applies as before.
forecast_daily(dataset="full", ensemble=True) asks for the ensemble percentiles (ensemble=1). Each DailyForecast then carries max_temp_ensemble and min_temp_ensemble (keys p000, p025, p050, p075, p100) and precip_accum_ensemble (keys p010 to p090). Either parameter alone returns none of them.
On HTTP 429 rate_limited, the client waits the Retry-After time, if it is 5 seconds or less, and sends the request once more. A burst of 16 parallel requests on a Freemium key (10 per second) now succeeds: 6 of them wait 1 second. Other 429s, such as daily_quota_exceeded, raise straight away. ForecaRateLimitError gains error and retry_after.
Adds forecast_3hourly() for /api/v1/forecast/3hourly: up to 113 steps of 3 hours (14 days), returned as HourlyForecast. Precipitation and snow accumulate over the three hours ending at each step. It takes periods, dataset and rounding like forecast_hourly().
forecast_minutely() now returns a MinutelyForecastList, a list that also carries the response's resolution: 1 (minutes) where the forecast is a radar nowcast, 60 elsewhere. It is still a list, so existing code keeps working.
A legacy API key gets HTTP 403 with only {"message": "Product unavailable"} for a product missing from its plan. That now raises ForecaProductUnavailableError, like the current body, instead of ForecaAuthError.