Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
snowykami committed Jan 30, 2024
2 parents e37acf1 + 87bf072 commit e057302
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 1 deletion.
3 changes: 2 additions & 1 deletion r.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
nonebot-adapter-onebot==2.3.0
nonebot2==2.1.1
nonebot2==2.1.1
pydantic==2.4.2
Empty file.
40 changes: 40 additions & 0 deletions src/builtin/liteyuki_plugin_weather/api/geo.py
Original file line number Diff line number Diff line change
@@ -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 changes: 29 additions & 0 deletions src/builtin/liteyuki_plugin_weather/api/weather.py
Original file line number Diff line number Diff line change
@@ -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'
Empty file.

0 comments on commit e057302

Please sign in to comment.