Ⓜ️手动从旧梦 81a191f merge

This commit is contained in:
2024-08-12 11:44:30 +08:00
parent 068feaa591
commit 2d67a703bd
214 changed files with 6457 additions and 10418 deletions

View File

@ -169,3 +169,20 @@ async def get_airquality(
async with httpx.AsyncClient() as client:
resp = await client.get(url, params=params)
return resp.json()
async def get_astronomy(
key: str,
location: str,
date: str,
dev: bool = get_memory_data("is_dev", True),
) -> dict:
url_path = f"v7/astronomy/sun?"
url = dev_url + url_path if dev else com_url + url_path
params = {
"key" : key,
"location" : location,
"date" : date,
}
async with httpx.AsyncClient() as client:
resp = await client.get(url, params=params)
return resp.json()