mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-30 06:44:44 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e057302e71
3
r.txt
3
r.txt
@ -1,2 +1,3 @@
|
||||
nonebot-adapter-onebot==2.3.0
|
||||
nonebot2==2.1.1
|
||||
nonebot2==2.1.1
|
||||
pydantic==2.4.2
|
0
src/builtin/liteyuki_plugin_weather/api/__init__.py
Normal file
0
src/builtin/liteyuki_plugin_weather/api/__init__.py
Normal file
40
src/builtin/liteyuki_plugin_weather/api/geo.py
Normal file
40
src/builtin/liteyuki_plugin_weather/api/geo.py
Normal 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
|
29
src/builtin/liteyuki_plugin_weather/api/weather.py
Normal file
29
src/builtin/liteyuki_plugin_weather/api/weather.py
Normal 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'
|
0
src/builtin/liteyuki_plugin_weather/qweather.py
Normal file
0
src/builtin/liteyuki_plugin_weather/qweather.py
Normal file
Loading…
Reference in New Issue
Block a user