LiteyukiBot-TriM/liteyuki/plugins/liteyuki_weather/models.py

53 lines
1.0 KiB
Python
Raw Normal View History

2024-04-04 23:02:18 +00:00
from nonebot import on_command
from liteyuki.utils.data import LiteModel
2024-04-01 03:37:29 +00:00
class Location(LiteModel):
name: str = ""
id: str = ""
2024-04-10 15:47:10 +00:00
lat: str = ""
lon: str = ""
adm2: str = ""
adm1: str = ""
2024-04-01 03:37:29 +00:00
country: str = ""
2024-04-10 15:47:10 +00:00
tz: str = ""
utcOffset: str = ""
isDst: str = ""
type: str = ""
rank: str = ""
fxLink: str = ""
sources: str = ""
license: str = ""
2024-04-01 03:37:29 +00:00
2024-04-04 23:02:18 +00:00
2024-04-10 15:47:10 +00:00
class CityLookupResponse(LiteModel):
code: str = ""
location: Location = Location()
2024-04-04 23:02:18 +00:00
2024-04-10 15:47:10 +00:00
class WeatherNow(LiteModel):
obsTime: str = ""
temp: str = ""
feelsLike: str = ""
icon: str = ""
text: str = ""
wind360: str = ""
windDir: str = ""
windScale: str = ""
windSpeed: str = ""
humidity: str = ""
precip: str = ""
pressure: str = ""
vis: str = ""
cloud: str = ""
dew: str = ""
sources: str = ""
license: str = ""
class WeatherNowResponse(LiteModel):
code: str = ""
updateTime: str = ""
fxLink: str = ""
now: WeatherNow = WeatherNow()