Added "alert" field to weather route and fixed some bugs

This commit is contained in:
2025-08-29 23:19:19 +02:00
parent a4ddc43579
commit 9fec72251d
5 changed files with 154 additions and 22 deletions

View File

@@ -1,12 +1,22 @@
package types
// The WeatherAlert data type, representing a
// weather alert
type WeatherAlert struct {
Event string `json:"event"`
Start ZephyrAlertDate `json:"startDate"`
End ZephyrAlertDate `json:"endDate"`
Description string `json:"description"`
}
// The Weather data type, representing the weather of a certain location
type Weather struct {
Date ZephyrDate `json:"date"`
Temperature string `json:"temperature"`
Min string `json:"min"`
Max string `json:"max"`
Condition string `json:"condition"`
FeelsLike string `json:"feelsLike"`
Emoji string `json:"emoji"`
Date ZephyrDate `json:"date"`
Temperature string `json:"temperature"`
Min string `json:"min"`
Max string `json:"max"`
Condition string `json:"condition"`
FeelsLike string `json:"feelsLike"`
Emoji string `json:"emoji"`
Alerts []WeatherAlert `json:"alerts"`
}