2020-04-15 15:13:31 -04:00
|
|
|
package weatherbot
|
2020-04-09 18:11:15 -04:00
|
|
|
|
|
|
|
type OneCallReport struct {
|
|
|
|
Lat int `json:"lat"`
|
|
|
|
Lon float64 `json:"lon"`
|
|
|
|
Timezone string `json:"timezone"`
|
|
|
|
Current Current `json:"current"`
|
|
|
|
Hourly []Hourly `json:"hourly"`
|
|
|
|
Daily []Daily `json:"daily"`
|
|
|
|
}
|
|
|
|
type Weather struct {
|
|
|
|
ID int `json:"id"`
|
|
|
|
Main string `json:"main"`
|
|
|
|
Description string `json:"description"`
|
|
|
|
Icon string `json:"icon"`
|
|
|
|
}
|
|
|
|
type Current struct {
|
|
|
|
Dt int `json:"dt"`
|
|
|
|
Sunrise int `json:"sunrise"`
|
|
|
|
Sunset int `json:"sunset"`
|
|
|
|
Temp float64 `json:"temp"`
|
|
|
|
FeelsLike float64 `json:"feels_like"`
|
|
|
|
Pressure int `json:"pressure"`
|
|
|
|
Humidity int `json:"humidity"`
|
|
|
|
DewPoint float64 `json:"dew_point"`
|
|
|
|
Uvi float64 `json:"uvi"`
|
|
|
|
Clouds int `json:"clouds"`
|
|
|
|
Visibility int `json:"visibility"`
|
|
|
|
WindSpeed float64 `json:"wind_speed"`
|
|
|
|
WindDeg int `json:"wind_deg"`
|
|
|
|
WindGust float64 `json:"wind_gust"`
|
|
|
|
Weather []Weather `json:"weather"`
|
|
|
|
Rain Rain `json:"rain"`
|
|
|
|
}
|
|
|
|
type Rain struct {
|
|
|
|
OneH float64 `json:"1h"`
|
|
|
|
}
|
|
|
|
type Hourly struct {
|
|
|
|
Dt int `json:"dt"`
|
|
|
|
Temp float64 `json:"temp"`
|
|
|
|
FeelsLike float64 `json:"feels_like"`
|
|
|
|
Pressure int `json:"pressure"`
|
|
|
|
Humidity int `json:"humidity"`
|
|
|
|
DewPoint float64 `json:"dew_point"`
|
|
|
|
Clouds int `json:"clouds"`
|
|
|
|
WindSpeed float64 `json:"wind_speed"`
|
|
|
|
WindDeg int `json:"wind_deg"`
|
|
|
|
Weather []Weather `json:"weather"`
|
|
|
|
Rain Rain `json:"rain,omitempty"`
|
|
|
|
}
|
|
|
|
type Temp struct {
|
|
|
|
Day float64 `json:"day"`
|
|
|
|
Min float64 `json:"min"`
|
|
|
|
Max float64 `json:"max"`
|
|
|
|
Night float64 `json:"night"`
|
|
|
|
Eve float64 `json:"eve"`
|
|
|
|
Morn float64 `json:"morn"`
|
|
|
|
}
|
|
|
|
type FeelsLike struct {
|
|
|
|
Day float64 `json:"day"`
|
|
|
|
Night float64 `json:"night"`
|
|
|
|
Eve float64 `json:"eve"`
|
|
|
|
Morn float64 `json:"morn"`
|
|
|
|
}
|
|
|
|
type Daily struct {
|
|
|
|
Dt int `json:"dt"`
|
|
|
|
Sunrise int `json:"sunrise"`
|
|
|
|
Sunset int `json:"sunset"`
|
|
|
|
Temp Temp `json:"temp"`
|
|
|
|
FeelsLike FeelsLike `json:"feels_like"`
|
|
|
|
Pressure int `json:"pressure"`
|
|
|
|
Humidity int `json:"humidity"`
|
|
|
|
DewPoint float64 `json:"dew_point"`
|
|
|
|
WindSpeed float64 `json:"wind_speed"`
|
|
|
|
WindDeg int `json:"wind_deg"`
|
|
|
|
Weather []Weather `json:"weather"`
|
|
|
|
Clouds int `json:"clouds"`
|
|
|
|
Rain float64 `json:"rain,omitempty"`
|
|
|
|
Uvi float64 `json:"uvi"`
|
|
|
|
}
|