diarama-api 0.1.13__tar.gz → 0.1.14__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.

Potentially problematic release.


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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diarama-api
3
- Version: 0.1.13
3
+ Version: 0.1.14
4
4
  Summary: Python SDK для работы с API Diarama Studio
5
5
  Author-email: Haru <hello@chinoharu.ru>
6
6
  License: MIT
@@ -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)
@@ -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.14
4
4
  Summary: Python SDK для работы с API Diarama Studio
5
5
  Author-email: Haru <hello@chinoharu.ru>
6
6
  License: MIT
@@ -5,6 +5,7 @@ diarama_api/client.py
5
5
  diarama_api/games.py
6
6
  diarama_api/media.py
7
7
  diarama_api/payments.py
8
+ diarama_api/platforms.py
8
9
  diarama_api/players.py
9
10
  diarama_api.egg-info/PKG-INFO
10
11
  diarama_api.egg-info/SOURCES.txt
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "diarama-api"
3
- version = "0.1.13"
3
+ version = "0.1.14"
4
4
  description = "Python SDK для работы с API Diarama Studio"
5
5
  authors = [{ name = "Haru", email = "hello@chinoharu.ru" }]
6
6
  readme = "README.md"
File without changes