diarama-api 0.1.16__tar.gz → 0.1.18__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.
- {diarama_api-0.1.16 → diarama_api-0.1.18}/PKG-INFO +1 -1
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api/__init__.py +2 -0
- diarama_api-0.1.18/diarama_api/files.py +17 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api.egg-info/PKG-INFO +1 -1
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api.egg-info/SOURCES.txt +1 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/pyproject.toml +1 -1
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api/auth.py +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api/client.py +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api/games.py +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api/media.py +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api/payments.py +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api/platforms.py +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api/players.py +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api.egg-info/dependency_links.txt +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api.egg-info/requires.txt +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/diarama_api.egg-info/top_level.txt +0 -0
- {diarama_api-0.1.16 → diarama_api-0.1.18}/setup.cfg +0 -0
|
@@ -5,6 +5,7 @@ from .games import Games
|
|
|
5
5
|
from .payments import Payments
|
|
6
6
|
from .media import Media
|
|
7
7
|
from .platforms import Platforms
|
|
8
|
+
from .files import Files
|
|
8
9
|
|
|
9
10
|
class DiaramaAPI:
|
|
10
11
|
def __init__(self, api_key):
|
|
@@ -15,3 +16,4 @@ class DiaramaAPI:
|
|
|
15
16
|
self.payments = Payments(self.client)
|
|
16
17
|
self.media = Media(self.client)
|
|
17
18
|
self.platforms = Platforms(self.client)
|
|
19
|
+
self.files = Files(self.client)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class Files:
|
|
2
|
+
def __init__(self, client):
|
|
3
|
+
self.client = client
|
|
4
|
+
|
|
5
|
+
def list(self):
|
|
6
|
+
return self.client._get("/files")
|
|
7
|
+
|
|
8
|
+
def download(self, filename):
|
|
9
|
+
return self.client._get(f"/files/{filename}")
|
|
10
|
+
|
|
11
|
+
def upload(self, file_obj, filename):
|
|
12
|
+
files = {'file': (filename, file_obj)}
|
|
13
|
+
return self.client._post("/files", files=files)
|
|
14
|
+
|
|
15
|
+
def edit(self, filename, content):
|
|
16
|
+
data = {"content": content}
|
|
17
|
+
return self.client._put(f"/files/{filename}", json=data)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|