This commit is contained in:
远野千束 2023-10-13 13:49:46 +08:00 committed by unknown
parent 8eae6ee8aa
commit 87bf072179
5 changed files with 71 additions and 1 deletions

3
r.txt
View File

@ -1,2 +1,3 @@
nonebot-adapter-onebot==2.3.0
nonebot2==2.1.1
nonebot2==2.1.1
pydantic==2.4.2

View File

@ -0,0 +1,40 @@
from typing import List, Dict
from pydantic import BaseModel
class Location(BaseModel):
name: str
id: str
lat: str
lon: str
adm2: str
adm1: str
country: str
tz: str
utcOffset: str
isDst: str
type: str
rank: str
fxLink: str
class CityLookup(BaseModel):
code: str
location: List['Location'] = list()
refer: Dict[str, List[str,]] = {'sources': None, 'license': None}
class CityTop(BaseModel):
code: str
topCityList: List['Location'] = list()
refer: Dict[str, List[str,]] = {'sources': None, 'license': None}
class PoiLookup(BaseModel):
code: str
poi: List['Location'] = list()
refer: Dict[str, List[str,]] = {'sources': None, 'license': None}
PoiRange = PoiLookup

View File

@ -0,0 +1,29 @@
from typing import Dict, List
from pydantic import BaseModel
class Now(BaseModel):
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 = None
dew: str = None
refer: Dict[str, List[str,]] = {'sources': None, 'license': None}
class WeatherNow(BaseModel):
code: str
updateTime: str
fxLink: str
now: 'NOW'