WIP: #50
This commit is contained in:
21
classes/api_client.py
Normal file
21
classes/api_client.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from garbage_api_client import Client
|
||||
from garbage_api_client.api.default.entry_find_locations_location_entries_get import (
|
||||
asyncio as entry_find,
|
||||
)
|
||||
from garbage_api_client.api.default.location_find_locations_get import (
|
||||
asyncio as location_find,
|
||||
)
|
||||
from garbage_api_client.api.default.location_get_locations_id_get import (
|
||||
asyncio as location_get,
|
||||
)
|
||||
|
||||
|
||||
class APIClient(Client):
|
||||
async def entry_find(self, *args, **kwargs):
|
||||
await entry_find(client=self, *args, **kwargs)
|
||||
|
||||
async def location_find(self, *args, **kwargs):
|
||||
await location_find(client=self, *args, **kwargs)
|
||||
|
||||
async def location_get(self, *args, **kwargs):
|
||||
await location_get(client=self, *args, **kwargs)
|
@@ -8,6 +8,7 @@ from libbot.pyrogram.classes import PyroClient as LibPyroClient
|
||||
from pymongo import ASCENDING, GEOSPHERE, TEXT
|
||||
from pyrogram.types import User
|
||||
|
||||
from classes.api_client import APIClient
|
||||
from classes.location import Location
|
||||
from classes.pyrouser import PyroUser
|
||||
from classes.updater import Updater
|
||||
@@ -25,6 +26,7 @@ class PyroClient(LibPyroClient):
|
||||
|
||||
self.updater = Updater(ClientSession())
|
||||
self.contexts = []
|
||||
self.api_client = APIClient()
|
||||
|
||||
if self.scheduler is not None:
|
||||
self.scheduler.add_job(
|
||||
|
Reference in New Issue
Block a user