anilibria-api-client 0.1.4__py3-none-any.whl

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.
methods/media.py ADDED
@@ -0,0 +1,45 @@
1
+ from ._libria import BaseMethod
2
+ from typing import Optional
3
+
4
+
5
+ class MediaMethod(BaseMethod):
6
+ async def promotions(
7
+ self,
8
+ include: Optional[str] = None,
9
+ exclude: Optional[str] = None
10
+ ):
11
+ """
12
+ Возвращает список промо-материалов или рекламные кампании в случайном порядке
13
+
14
+ Args:
15
+ include: Поля для включения
16
+ exclude: Поля для исключения
17
+ """
18
+ params = {
19
+ "include": include,
20
+ "exclude": exclude
21
+ }
22
+
23
+ return await self._api.get("/media/promotions", params=params)
24
+
25
+ async def videos(
26
+ self,
27
+ limit: Optional[int] = None,
28
+ include: Optional[str] = None,
29
+ exclude: Optional[str] = None
30
+ ):
31
+ """
32
+ Возвращает список последних видео-роликов
33
+
34
+ Args:
35
+ limit: Лимит возвращаемых полей
36
+ include: Поля для включения
37
+ exclude: Поля для исключения
38
+ """
39
+ params = {
40
+ "limit": limit,
41
+ "include": include,
42
+ "exclude": exclude
43
+ }
44
+
45
+ return await self._api.get("/media/videos", params=params)
methods/teams.py ADDED
@@ -0,0 +1,61 @@
1
+ from ._libria import BaseMethod
2
+ from typing import Optional
3
+
4
+
5
+ class TeamsMethod(BaseMethod):
6
+ async def get(
7
+ self,
8
+ include: Optional[str] = None,
9
+ exclude: Optional[str] = None
10
+ ):
11
+ """
12
+ Возвращает список всех команд
13
+
14
+ Args:
15
+ include: Поля для включения
16
+ exclude: Поля для исключения
17
+ """
18
+ params = {
19
+ "include": include,
20
+ "exclude": exclude
21
+ }
22
+
23
+ return await self._api.get("/teams/", params=params)
24
+
25
+ async def roles(
26
+ self,
27
+ include: Optional[str] = None,
28
+ exclude: Optional[str] = None
29
+ ):
30
+ """
31
+ Возвращает список всех ролей в командах
32
+
33
+ Args:
34
+ include: Поля для включения
35
+ exclude: Поля для исключения
36
+ """
37
+ params = {
38
+ "include": include,
39
+ "exclude": exclude
40
+ }
41
+
42
+ return await self._api.get("/teams/roles", params=params)
43
+
44
+ async def users(
45
+ self,
46
+ include: Optional[str] = None,
47
+ exclude: Optional[str] = None
48
+ ):
49
+ """
50
+ Возвращает список всех анилибрийцов с указанием команды и своих ролей
51
+
52
+ Args:
53
+ include: Поля для включения
54
+ exclude: Поля для исключения
55
+ """
56
+ params = {
57
+ "include": include,
58
+ "exclude": exclude
59
+ }
60
+
61
+ return await self._api.get("/teams/users", params=params)