diarama-api 0.1.14__py3-none-any.whl → 0.1.16__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.
- diarama_api/games.py +1 -1
- diarama_api/media.py +7 -1
- {diarama_api-0.1.14.dist-info → diarama_api-0.1.16.dist-info}/METADATA +1 -1
- {diarama_api-0.1.14.dist-info → diarama_api-0.1.16.dist-info}/RECORD +6 -6
- {diarama_api-0.1.14.dist-info → diarama_api-0.1.16.dist-info}/WHEEL +0 -0
- {diarama_api-0.1.14.dist-info → diarama_api-0.1.16.dist-info}/top_level.txt +0 -0
diarama_api/games.py
CHANGED
|
@@ -20,7 +20,7 @@ class Games:
|
|
|
20
20
|
return self.client._post("/games/", data)
|
|
21
21
|
|
|
22
22
|
def update(self, game_id, **kwargs):
|
|
23
|
-
allowed = ["name", "version", "author"]
|
|
23
|
+
allowed = ["name", "version", "author", "description", "platforms", "media_id"]
|
|
24
24
|
data = {k: v for k, v in kwargs.items() if k in allowed}
|
|
25
25
|
return self.client._put(f"/games/{game_id}", data)
|
|
26
26
|
|
diarama_api/media.py
CHANGED
|
@@ -4,7 +4,8 @@ class Media:
|
|
|
4
4
|
|
|
5
5
|
def create_image(self, url, alt_text=None):
|
|
6
6
|
data = {"url": url}
|
|
7
|
-
if alt_text:
|
|
7
|
+
if alt_text:
|
|
8
|
+
data["alt_text"] = alt_text
|
|
8
9
|
return self.client._post("/media/images", data)
|
|
9
10
|
|
|
10
11
|
def create_avatar(self, image_id):
|
|
@@ -12,3 +13,8 @@ class Media:
|
|
|
12
13
|
|
|
13
14
|
def create_banner(self, image_id):
|
|
14
15
|
return self.client._post("/media/banners", {"image_id": image_id})
|
|
16
|
+
|
|
17
|
+
def upload(self, file_obj):
|
|
18
|
+
"""Загрузить файл как медиа"""
|
|
19
|
+
files = {'file': file_obj}
|
|
20
|
+
return self.client._post("/media/upload", files=files)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
diarama_api/__init__.py,sha256=EPszHsXnxfWYivzy6n2D9G9cP8YHCXqNd9BfMmDhDKc,576
|
|
2
2
|
diarama_api/auth.py,sha256=y5PkFDqMyD2FXQ0fepEzlS_XDAguLcS1fqq7lKkwV_Y,358
|
|
3
3
|
diarama_api/client.py,sha256=lru2OnwZ0U8RzqfzmN8jiP9OTrstlc2tM6Lol-j4NPE,1247
|
|
4
|
-
diarama_api/games.py,sha256=
|
|
5
|
-
diarama_api/media.py,sha256=
|
|
4
|
+
diarama_api/games.py,sha256=4Bls55VmOIXEbLw0HVIffa-dAZBVyze4Ii4UD3pSITE,950
|
|
5
|
+
diarama_api/media.py,sha256=jregTsjacX0C2Mj4OEkETz1G3nCZR3ix_8s93mkNz0c,709
|
|
6
6
|
diarama_api/payments.py,sha256=kA9jTsJsSf2e0D3T517Xchmy-WNGtQdAOcDpbbvXkAM,738
|
|
7
7
|
diarama_api/platforms.py,sha256=Rdb_kSROFDJ0qQTfc57DgoifC0nqRh6xfdn30zNEjw0,922
|
|
8
8
|
diarama_api/players.py,sha256=9ThcJKsQNhvBMvT6DI-rdxwfw4xa3C-9nTFEoNFFuLk,892
|
|
9
|
-
diarama_api-0.1.
|
|
10
|
-
diarama_api-0.1.
|
|
11
|
-
diarama_api-0.1.
|
|
12
|
-
diarama_api-0.1.
|
|
9
|
+
diarama_api-0.1.16.dist-info/METADATA,sha256=nHYsWQ2yYnpOiUm4UQtYxs3bjCZgCEJk3nf072RD82s,324
|
|
10
|
+
diarama_api-0.1.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
diarama_api-0.1.16.dist-info/top_level.txt,sha256=OcL6tQomtjFhzrraJ9GouJCWoc668jQEsqbUGxM8E7E,12
|
|
12
|
+
diarama_api-0.1.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|