Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
36 lines (27 loc) · 1.14 KB

File metadata and controls

36 lines (27 loc) · 1.14 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from typing import Any, Self
from maxbot_api_client_python.client import Client
from maxbot_api_client_python.types.models import Config
from maxbot_api_client_python import tools
class API:
def __init__(self, cfg: Config) -> None:
self.client = Client(cfg)
self.bots = tools.Bots(self.client)
self.chats = tools.Chats(self.client)
self.helpers = tools.Helpers(self.client)
self.messages = tools.Messages(self.client)
self.subscriptions = tools.Subscriptions(self.client)
self.uploads = tools.Uploads(self.client)
def __enter__(self) -> Self:
self.client.__enter__()
return self
def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
self.client.__exit__(exc_type, exc_val, exc_tb)
async def __aenter__(self) -> Self:
await self.client.__aenter__()
return self
async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None:
await self.client.__aexit__(exc_type, exc_val, exc_tb)
def close(self) -> None:
self.client.close()
async def aclose(self) -> None:
await self.client.aclose()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.