diarama-api 0.1.13__py3-none-any.whl → 0.1.15__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.

Potentially problematic release.


This version of diarama-api might be problematic. Click here for more details.

diarama_api/__init__.py CHANGED
@@ -4,6 +4,7 @@ from .players import Players
4
4
  from .games import Games
5
5
  from .payments import Payments
6
6
  from .media import Media
7
+ from .platforms import Platforms
7
8
 
8
9
  class DiaramaAPI:
9
10
  def __init__(self, api_key):
@@ -13,3 +14,4 @@ class DiaramaAPI:
13
14
  self.games = Games(self.client)
14
15
  self.payments = Payments(self.client)
15
16
  self.media = Media(self.client)
17
+ self.platforms = Platforms(self.client)
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
 
@@ -0,0 +1,26 @@
1
+ # api/platforms.py
2
+ class Platforms:
3
+ def __init__(self, client):
4
+ self.client = client
5
+
6
+ def list(self):
7
+ """Получить список всех платформ"""
8
+ return self.client._get("/platforms/")
9
+
10
+ def get(self, platform_id):
11
+ """Получить платформу по ID"""
12
+ return self.client._get(f"/platforms/{platform_id}")
13
+
14
+ def create(self, name):
15
+ """Создать новую платформу"""
16
+ data = {"name": name}
17
+ return self.client._post("/platforms/", data)
18
+
19
+ def update(self, platform_id, name):
20
+ """Обновить платформу"""
21
+ data = {"name": name}
22
+ return self.client._put(f"/platforms/{platform_id}", data)
23
+
24
+ def delete(self, platform_id):
25
+ """Удалить платформу"""
26
+ return self.client._delete(f"/platforms/{platform_id}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diarama-api
3
- Version: 0.1.13
3
+ Version: 0.1.15
4
4
  Summary: Python SDK для работы с API Diarama Studio
5
5
  Author-email: Haru <hello@chinoharu.ru>
6
6
  License: MIT
@@ -0,0 +1,12 @@
1
+ diarama_api/__init__.py,sha256=EPszHsXnxfWYivzy6n2D9G9cP8YHCXqNd9BfMmDhDKc,576
2
+ diarama_api/auth.py,sha256=y5PkFDqMyD2FXQ0fepEzlS_XDAguLcS1fqq7lKkwV_Y,358
3
+ diarama_api/client.py,sha256=lru2OnwZ0U8RzqfzmN8jiP9OTrstlc2tM6Lol-j4NPE,1247
4
+ diarama_api/games.py,sha256=4Bls55VmOIXEbLw0HVIffa-dAZBVyze4Ii4UD3pSITE,950
5
+ diarama_api/media.py,sha256=rwiOX2QSt5grZpj25639t4w8oyeV0Xtu72h_FF_d4WU,500
6
+ diarama_api/payments.py,sha256=kA9jTsJsSf2e0D3T517Xchmy-WNGtQdAOcDpbbvXkAM,738
7
+ diarama_api/platforms.py,sha256=Rdb_kSROFDJ0qQTfc57DgoifC0nqRh6xfdn30zNEjw0,922
8
+ diarama_api/players.py,sha256=9ThcJKsQNhvBMvT6DI-rdxwfw4xa3C-9nTFEoNFFuLk,892
9
+ diarama_api-0.1.15.dist-info/METADATA,sha256=B2QZKVOL3P1F2bNHTRXtkiZxgF8NcCnU7QsGJonDIJQ,324
10
+ diarama_api-0.1.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ diarama_api-0.1.15.dist-info/top_level.txt,sha256=OcL6tQomtjFhzrraJ9GouJCWoc668jQEsqbUGxM8E7E,12
12
+ diarama_api-0.1.15.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- diarama_api/__init__.py,sha256=cJmhN50DnymYRMg3aLptA7UsbEoXswRQoV8S8AlpphY,493
2
- diarama_api/auth.py,sha256=y5PkFDqMyD2FXQ0fepEzlS_XDAguLcS1fqq7lKkwV_Y,358
3
- diarama_api/client.py,sha256=lru2OnwZ0U8RzqfzmN8jiP9OTrstlc2tM6Lol-j4NPE,1247
4
- diarama_api/games.py,sha256=kYkkX0jHYftF6OZ2pSDns2eSenTyNu299CIgElNerAo,910
5
- diarama_api/media.py,sha256=rwiOX2QSt5grZpj25639t4w8oyeV0Xtu72h_FF_d4WU,500
6
- diarama_api/payments.py,sha256=kA9jTsJsSf2e0D3T517Xchmy-WNGtQdAOcDpbbvXkAM,738
7
- diarama_api/players.py,sha256=9ThcJKsQNhvBMvT6DI-rdxwfw4xa3C-9nTFEoNFFuLk,892
8
- diarama_api-0.1.13.dist-info/METADATA,sha256=7k9kzhB2zMxX8h5nleOl5f3FhfuGnmXRGpTyRxYagwc,324
9
- diarama_api-0.1.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- diarama_api-0.1.13.dist-info/top_level.txt,sha256=OcL6tQomtjFhzrraJ9GouJCWoc668jQEsqbUGxM8E7E,12
11
- diarama_api-0.1.13.dist-info/RECORD,,