anilibria-api-client 0.1.7__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/LICENSE +21 -21
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/PKG-INFO +83 -71
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/README.md +56 -44
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/__init__.py +28 -28
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/api_client.py +58 -58
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/base_api/api_class.py +283 -283
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/exceptions.py +6 -6
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/helper.py +100 -100
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/__init__.py +5 -5
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/_helper.py +225 -225
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/_libria.py +9 -9
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/accounts.py +348 -348
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/ads.py +22 -22
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/anime.py +669 -669
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/app.py +33 -33
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/media.py +44 -44
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/methods/teams.py +60 -60
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/models.py +63 -63
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/types.py +55 -55
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client.egg-info/PKG-INFO +83 -71
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/pyproject.toml +41 -41
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/setup.cfg +4 -4
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client.egg-info/SOURCES.txt +0 -0
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client.egg-info/dependency_links.txt +0 -0
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client.egg-info/requires.txt +0 -0
- {anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client.egg-info/top_level.txt +0 -0
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2025 Semen Bolotov
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Semen Bolotov
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -1,71 +1,83 @@
|
|
1
|
-
Metadata-Version: 2.4
|
2
|
-
Name: anilibria-api-client
|
3
|
-
Version: 0.1.
|
4
|
-
Summary: Python async API wrapper for AniLibria Swagger
|
5
|
-
Author-email: semen-bol <syoma.bolotov@bk.ru>
|
6
|
-
License: MIT
|
7
|
-
Project-URL: Homepage, https://github.com/semen-bol/Anilibria-Api-Client
|
8
|
-
Project-URL: Docs, https://anilibria-api-client.readthedocs.io/latest/
|
9
|
-
Project-URL: Issues, https://github.com/semen-bol/Anilibria-Api-Client/issues
|
10
|
-
Requires-Python: >=3.13
|
11
|
-
Description-Content-Type: text/markdown
|
12
|
-
License-File: LICENSE
|
13
|
-
Requires-Dist: aiohttp==3.12.15
|
14
|
-
Requires-Dist: aiofiles==24.1.0
|
15
|
-
Requires-Dist: pydantic==2.11.7
|
16
|
-
Requires-Dist: m3u8-To-MP4==0.1.11
|
17
|
-
Requires-Dist: ffmpeg-python==0.2.0
|
18
|
-
Provides-Extra: docs
|
19
|
-
Requires-Dist: sphinx>=7.0.0; extra == "docs"
|
20
|
-
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
|
21
|
-
Requires-Dist: sphinx-autodoc-typehints>=1.0.0; extra == "docs"
|
22
|
-
Requires-Dist: sphinx_design>=0.6.1; extra == "docs"
|
23
|
-
Requires-Dist: furo>=2025.7.19; extra == "docs"
|
24
|
-
Requires-Dist: sphinx-hoverxref>=1.3.0; extra == "docs"
|
25
|
-
Requires-Dist: readthedocs-sphinx-search>=0.1.2; extra == "docs"
|
26
|
-
Dynamic: license-file
|
27
|
-
|
28
|
-
# Anilibria-Api-Client
|
29
|
-
|
30
|
-
[](https://pypi.org/project/anilibria-api-client)
|
31
|
-

|
33
|
-

|
34
|
-
|
35
|
-
> [!CAUTION]
|
36
|
-
> **It is not an official wrapper.** [Official AniLibria's Swagger](https://anilibria.top/api/docs/v1)
|
37
|
-
|
38
|
-
Anilibria-API-Client - this a async client to work with Anilibria API, use a aiohttp. Full writed at python
|
39
|
-
|
40
|
-
## Installing
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: anilibria-api-client
|
3
|
+
Version: 0.1.8
|
4
|
+
Summary: Python async API wrapper for AniLibria Swagger
|
5
|
+
Author-email: semen-bol <syoma.bolotov@bk.ru>
|
6
|
+
License: MIT
|
7
|
+
Project-URL: Homepage, https://github.com/semen-bol/Anilibria-Api-Client
|
8
|
+
Project-URL: Docs, https://anilibria-api-client.readthedocs.io/latest/
|
9
|
+
Project-URL: Issues, https://github.com/semen-bol/Anilibria-Api-Client/issues
|
10
|
+
Requires-Python: >=3.13
|
11
|
+
Description-Content-Type: text/markdown
|
12
|
+
License-File: LICENSE
|
13
|
+
Requires-Dist: aiohttp==3.12.15
|
14
|
+
Requires-Dist: aiofiles==24.1.0
|
15
|
+
Requires-Dist: pydantic==2.11.7
|
16
|
+
Requires-Dist: m3u8-To-MP4==0.1.11
|
17
|
+
Requires-Dist: ffmpeg-python==0.2.0
|
18
|
+
Provides-Extra: docs
|
19
|
+
Requires-Dist: sphinx>=7.0.0; extra == "docs"
|
20
|
+
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
|
21
|
+
Requires-Dist: sphinx-autodoc-typehints>=1.0.0; extra == "docs"
|
22
|
+
Requires-Dist: sphinx_design>=0.6.1; extra == "docs"
|
23
|
+
Requires-Dist: furo>=2025.7.19; extra == "docs"
|
24
|
+
Requires-Dist: sphinx-hoverxref>=1.3.0; extra == "docs"
|
25
|
+
Requires-Dist: readthedocs-sphinx-search>=0.1.2; extra == "docs"
|
26
|
+
Dynamic: license-file
|
27
|
+
|
28
|
+
# Anilibria-Api-Client
|
29
|
+
|
30
|
+
[](https://pypi.org/project/anilibria-api-client)
|
31
|
+

|
32
|
+

|
33
|
+

|
34
|
+
|
35
|
+
> [!CAUTION]
|
36
|
+
> **It is not an official wrapper.** [Official AniLibria's Swagger](https://anilibria.top/api/docs/v1)
|
37
|
+
|
38
|
+
Anilibria-API-Client - this a async client to work with Anilibria API, use a aiohttp. Full writed at python
|
39
|
+
|
40
|
+
## Installing
|
41
|
+
|
42
|
+
Tested at python 3.13
|
43
|
+
|
44
|
+
### pip
|
45
|
+
|
46
|
+
```bash
|
47
|
+
$ pip install anilibria-api-client
|
48
|
+
```
|
49
|
+
|
50
|
+
## Usage
|
51
|
+
|
52
|
+
```python
|
53
|
+
from anilibria_client import AsyncAnilibriaAPI # Client
|
54
|
+
from anilibria_client.exceptions import AnilibriaException, AnilibriaValidationException # Errors
|
55
|
+
from anilibria_client.types import * # Types for some methods
|
56
|
+
from anilibria_client.models import * # Models for some methods
|
57
|
+
from anilibria_client.helper import * # Download anime, save torrents files and more
|
58
|
+
|
59
|
+
async def main():
|
60
|
+
async with AsyncAnilibriaAPI() as api:
|
61
|
+
await api.teams.users(include="nickname")
|
62
|
+
|
63
|
+
api = AsyncAnilibriaAPI() # like js support
|
64
|
+
await api.teams.users(include="nickname")
|
65
|
+
```
|
66
|
+
|
67
|
+
## Documentation 📃
|
68
|
+
|
69
|
+
[Docs](https://anilibria-api-client.readthedocs.io/latest/)
|
70
|
+
|
71
|
+
## Issues/Contributing
|
72
|
+
|
73
|
+
### Issues
|
74
|
+
|
75
|
+
Report for any issues [here](https://github.com/semen-bol/Anilibria-Api-Client/issues)
|
76
|
+
|
77
|
+
### Contributing
|
78
|
+
|
79
|
+
We allow contributing! Read the [CODE_OF_CONDUCT.md](https://github.com/semen-bol/Anilibria-Api-Client/blob/main/CODE_OF_CONDUCT.md)
|
80
|
+
|
81
|
+
## License 📄
|
82
|
+
|
83
|
+
Anilibria-Api-Client is [MIT](https://github.com/semen-bol/Anilibria-Api-Client/blob/main/LICENSE) licenced.
|
@@ -1,44 +1,56 @@
|
|
1
|
-
# Anilibria-Api-Client
|
2
|
-
|
3
|
-
[](https://pypi.org/project/anilibria-api-client)
|
4
|
-

|
6
|
-

|
7
|
-
|
8
|
-
> [!CAUTION]
|
9
|
-
> **It is not an official wrapper.** [Official AniLibria's Swagger](https://anilibria.top/api/docs/v1)
|
10
|
-
|
11
|
-
Anilibria-API-Client - this a async client to work with Anilibria API, use a aiohttp. Full writed at python
|
12
|
-
|
13
|
-
## Installing
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
1
|
+
# Anilibria-Api-Client
|
2
|
+
|
3
|
+
[](https://pypi.org/project/anilibria-api-client)
|
4
|
+

|
5
|
+

|
6
|
+

|
7
|
+
|
8
|
+
> [!CAUTION]
|
9
|
+
> **It is not an official wrapper.** [Official AniLibria's Swagger](https://anilibria.top/api/docs/v1)
|
10
|
+
|
11
|
+
Anilibria-API-Client - this a async client to work with Anilibria API, use a aiohttp. Full writed at python
|
12
|
+
|
13
|
+
## Installing
|
14
|
+
|
15
|
+
Tested at python 3.13
|
16
|
+
|
17
|
+
### pip
|
18
|
+
|
19
|
+
```bash
|
20
|
+
$ pip install anilibria-api-client
|
21
|
+
```
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
```python
|
26
|
+
from anilibria_client import AsyncAnilibriaAPI # Client
|
27
|
+
from anilibria_client.exceptions import AnilibriaException, AnilibriaValidationException # Errors
|
28
|
+
from anilibria_client.types import * # Types for some methods
|
29
|
+
from anilibria_client.models import * # Models for some methods
|
30
|
+
from anilibria_client.helper import * # Download anime, save torrents files and more
|
31
|
+
|
32
|
+
async def main():
|
33
|
+
async with AsyncAnilibriaAPI() as api:
|
34
|
+
await api.teams.users(include="nickname")
|
35
|
+
|
36
|
+
api = AsyncAnilibriaAPI() # like js support
|
37
|
+
await api.teams.users(include="nickname")
|
38
|
+
```
|
39
|
+
|
40
|
+
## Documentation 📃
|
41
|
+
|
42
|
+
[Docs](https://anilibria-api-client.readthedocs.io/latest/)
|
43
|
+
|
44
|
+
## Issues/Contributing
|
45
|
+
|
46
|
+
### Issues
|
47
|
+
|
48
|
+
Report for any issues [here](https://github.com/semen-bol/Anilibria-Api-Client/issues)
|
49
|
+
|
50
|
+
### Contributing
|
51
|
+
|
52
|
+
We allow contributing! Read the [CODE_OF_CONDUCT.md](https://github.com/semen-bol/Anilibria-Api-Client/blob/main/CODE_OF_CONDUCT.md)
|
53
|
+
|
54
|
+
## License 📄
|
55
|
+
|
56
|
+
Anilibria-Api-Client is [MIT](https://github.com/semen-bol/Anilibria-Api-Client/blob/main/LICENSE) licenced.
|
@@ -1,29 +1,29 @@
|
|
1
|
-
from .api_client import AsyncAnilibriaAPI
|
2
|
-
|
3
|
-
from .types import (
|
4
|
-
CollectionType,
|
5
|
-
ContentType,
|
6
|
-
AgeRating,
|
7
|
-
Seasons,
|
8
|
-
SortType,
|
9
|
-
PublishStatusesType,
|
10
|
-
ProductionStatusesType
|
11
|
-
)
|
12
|
-
|
13
|
-
from .models import (
|
14
|
-
TimeCode,
|
15
|
-
Release,
|
16
|
-
ReleaseCollection
|
17
|
-
)
|
18
|
-
|
19
|
-
from .exceptions import (
|
20
|
-
AnilibriaException,
|
21
|
-
AnilibriaValidationException
|
22
|
-
)
|
23
|
-
|
24
|
-
from .helper import (
|
25
|
-
async_download,
|
26
|
-
async_ffmpeg_download,
|
27
|
-
auth,
|
28
|
-
download_torrent_file
|
1
|
+
from .api_client import AsyncAnilibriaAPI
|
2
|
+
|
3
|
+
from .types import (
|
4
|
+
CollectionType,
|
5
|
+
ContentType,
|
6
|
+
AgeRating,
|
7
|
+
Seasons,
|
8
|
+
SortType,
|
9
|
+
PublishStatusesType,
|
10
|
+
ProductionStatusesType
|
11
|
+
)
|
12
|
+
|
13
|
+
from .models import (
|
14
|
+
TimeCode,
|
15
|
+
Release,
|
16
|
+
ReleaseCollection
|
17
|
+
)
|
18
|
+
|
19
|
+
from .exceptions import (
|
20
|
+
AnilibriaException,
|
21
|
+
AnilibriaValidationException
|
22
|
+
)
|
23
|
+
|
24
|
+
from .helper import (
|
25
|
+
async_download,
|
26
|
+
async_ffmpeg_download,
|
27
|
+
auth,
|
28
|
+
download_torrent_file
|
29
29
|
)
|
{anilibria_api_client-0.1.7 → anilibria_api_client-0.1.8}/anilibria_api_client/api_client.py
RENAMED
@@ -1,59 +1,59 @@
|
|
1
|
-
from .base_api.api_class import AsyncBaseAPI
|
2
|
-
from typing import Optional, Dict, Any, Optional, Union
|
3
|
-
|
4
|
-
from .methods import (
|
5
|
-
AccountsMethod,
|
6
|
-
AdsMethod,
|
7
|
-
AnimeMethod,
|
8
|
-
AppMethod,
|
9
|
-
MediaMethod,
|
10
|
-
TeamsMethod
|
11
|
-
)
|
12
|
-
|
13
|
-
|
14
|
-
class AsyncAnilibriaAPI(AsyncBaseAPI):
|
15
|
-
"""
|
16
|
-
Асинхронный клиент для работы с AnilibriaAPI
|
17
|
-
"""
|
18
|
-
def __init__(
|
19
|
-
self,
|
20
|
-
base_url: str = "https://anilibria.top/api/v1",
|
21
|
-
authorization: str = "Bearer"
|
22
|
-
):
|
23
|
-
headers = {
|
24
|
-
"Content-Type": "application/json",
|
25
|
-
"Authorization": authorization
|
26
|
-
}
|
27
|
-
|
28
|
-
super().__init__(base_url=base_url, headers=headers)
|
29
|
-
|
30
|
-
self.accounts = AccountsMethod(api=self)
|
31
|
-
self.ads = AdsMethod(api=self)
|
32
|
-
self.anime = AnimeMethod(api=self)
|
33
|
-
self.app = AppMethod(api=self)
|
34
|
-
self.media = MediaMethod(api=self)
|
35
|
-
self.teams = TeamsMethod(api=self)
|
36
|
-
|
37
|
-
async def execute(
|
38
|
-
self,
|
39
|
-
endpoint: str,
|
40
|
-
method: str = 'GET',
|
41
|
-
data: Optional[Union[Dict[str, Any], str, bytes]] = None,
|
42
|
-
json_data: Optional[Dict[str, Any]] = None,
|
43
|
-
headers: Optional[Dict[str, str]] = None,
|
44
|
-
**kwargs
|
45
|
-
) -> Union[Dict[str, Any], str, bytes]:
|
46
|
-
"""
|
47
|
-
Создание своего уникального запроса
|
48
|
-
|
49
|
-
:param method: Метод используемый для запроса, например GET (обязательно)
|
50
|
-
:param endpoint: Конечная точка API (обязательно)
|
51
|
-
:param data: Тело запроса
|
52
|
-
:param json_data: JSON тело запроса
|
53
|
-
:param headers: Дополнительные заголовки
|
54
|
-
:param kwargs: Дополнительные аргументы для aiohttp
|
55
|
-
:return: Ответ от API
|
56
|
-
"""
|
57
|
-
|
58
|
-
return await self._request(method, endpoint, data=data, json_data=json_data, headers=headers, **kwargs)
|
1
|
+
from .base_api.api_class import AsyncBaseAPI
|
2
|
+
from typing import Optional, Dict, Any, Optional, Union
|
3
|
+
|
4
|
+
from .methods import (
|
5
|
+
AccountsMethod,
|
6
|
+
AdsMethod,
|
7
|
+
AnimeMethod,
|
8
|
+
AppMethod,
|
9
|
+
MediaMethod,
|
10
|
+
TeamsMethod
|
11
|
+
)
|
12
|
+
|
13
|
+
|
14
|
+
class AsyncAnilibriaAPI(AsyncBaseAPI):
|
15
|
+
"""
|
16
|
+
Асинхронный клиент для работы с AnilibriaAPI
|
17
|
+
"""
|
18
|
+
def __init__(
|
19
|
+
self,
|
20
|
+
base_url: str = "https://anilibria.top/api/v1",
|
21
|
+
authorization: str = "Bearer"
|
22
|
+
):
|
23
|
+
headers = {
|
24
|
+
"Content-Type": "application/json",
|
25
|
+
"Authorization": authorization
|
26
|
+
}
|
27
|
+
|
28
|
+
super().__init__(base_url=base_url, headers=headers)
|
29
|
+
|
30
|
+
self.accounts = AccountsMethod(api=self)
|
31
|
+
self.ads = AdsMethod(api=self)
|
32
|
+
self.anime = AnimeMethod(api=self)
|
33
|
+
self.app = AppMethod(api=self)
|
34
|
+
self.media = MediaMethod(api=self)
|
35
|
+
self.teams = TeamsMethod(api=self)
|
36
|
+
|
37
|
+
async def execute(
|
38
|
+
self,
|
39
|
+
endpoint: str,
|
40
|
+
method: str = 'GET',
|
41
|
+
data: Optional[Union[Dict[str, Any], str, bytes]] = None,
|
42
|
+
json_data: Optional[Dict[str, Any]] = None,
|
43
|
+
headers: Optional[Dict[str, str]] = None,
|
44
|
+
**kwargs
|
45
|
+
) -> Union[Dict[str, Any], str, bytes]:
|
46
|
+
"""
|
47
|
+
Создание своего уникального запроса
|
48
|
+
|
49
|
+
:param method: Метод используемый для запроса, например GET (обязательно)
|
50
|
+
:param endpoint: Конечная точка API (обязательно)
|
51
|
+
:param data: Тело запроса
|
52
|
+
:param json_data: JSON тело запроса
|
53
|
+
:param headers: Дополнительные заголовки
|
54
|
+
:param kwargs: Дополнительные аргументы для aiohttp
|
55
|
+
:return: Ответ от API
|
56
|
+
"""
|
57
|
+
|
58
|
+
return await self._request(method, endpoint, data=data, json_data=json_data, headers=headers, **kwargs)
|
59
59
|
|