This repository has been archived on 2024-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
TelegramBot/classes/geobase/geobase_api.py

24 lines
710 B
Python
Raw Permalink Normal View History

2023-08-27 23:43:16 +03:00
from typing import List
from aiohttp import ClientSession
from classes.geobase.geobase import GeoBase
from classes.location import Location
# from urllib.parse import urlencode
class GeoBaseAPI(GeoBase):
async def get_location(self, session: ClientSession, location_id: int) -> Location:
# query = {"geoNameId": location_id, "style": "MEDIUM"}
# response = await session.get(f"http://api.geonames.org/get?{urlencode(query)}")
pass
async def find_location(self, session: ClientSession, name: str) -> List[Location]:
pass
async def nearby_location(
self, session: ClientSession, lat: float, lon: float, radius: int
) -> List[Location]:
pass