diarama-api 0.1.12__tar.gz → 0.1.13__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.12 → diarama_api-0.1.13}/PKG-INFO +1 -1
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api/client.py +5 -2
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api.egg-info/PKG-INFO +1 -1
- {diarama_api-0.1.12 → diarama_api-0.1.13}/pyproject.toml +1 -1
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api/__init__.py +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api/auth.py +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api/games.py +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api/media.py +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api/payments.py +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api/players.py +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api.egg-info/SOURCES.txt +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api.egg-info/dependency_links.txt +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api.egg-info/requires.txt +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/diarama_api.egg-info/top_level.txt +0 -0
- {diarama_api-0.1.12 → diarama_api-0.1.13}/setup.cfg +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import json
|
|
1
2
|
import requests
|
|
2
3
|
|
|
3
4
|
class DiaramaAPIClient:
|
|
@@ -15,12 +16,14 @@ class DiaramaAPIClient:
|
|
|
15
16
|
return r.json()
|
|
16
17
|
|
|
17
18
|
def _post(self, endpoint, data=None):
|
|
18
|
-
|
|
19
|
+
json_data = json.dumps(data, ensure_ascii=False).encode('utf-8')
|
|
20
|
+
r = requests.post(f"{self.base_url}{endpoint}", headers=self.headers, data=json_data)
|
|
19
21
|
r.raise_for_status()
|
|
20
22
|
return r.json()
|
|
21
23
|
|
|
22
24
|
def _put(self, endpoint, data=None):
|
|
23
|
-
|
|
25
|
+
json_data = json.dumps(data, ensure_ascii=False).encode('utf-8')
|
|
26
|
+
r = requests.put(f"{self.base_url}{endpoint}", headers=self.headers, data=json_data)
|
|
24
27
|
r.raise_for_status()
|
|
25
28
|
return r.json()
|
|
26
29
|
|
|
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
|