diarama-api 0.1.11__py3-none-any.whl → 0.1.13__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/client.py CHANGED
@@ -1,3 +1,4 @@
1
+ import json
1
2
  import requests
2
3
 
3
4
  class DiaramaAPIClient:
@@ -6,7 +7,7 @@ class DiaramaAPIClient:
6
7
  self.base_url = base_url
7
8
  self.headers = {
8
9
  "X-API-Key": api_key,
9
- "Content-Type": "application/json"
10
+ "Content-Type": "application/json; charset=utf-8"
10
11
  }
11
12
 
12
13
  def _get(self, endpoint, params=None):
@@ -15,12 +16,14 @@ class DiaramaAPIClient:
15
16
  return r.json()
16
17
 
17
18
  def _post(self, endpoint, data=None):
18
- r = requests.post(f"{self.base_url}{endpoint}", headers=self.headers, json=data)
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
- r = requests.put(f"{self.base_url}{endpoint}", headers=self.headers, json=data)
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diarama-api
3
- Version: 0.1.11
3
+ Version: 0.1.13
4
4
  Summary: Python SDK для работы с API Diarama Studio
5
5
  Author-email: Haru <hello@chinoharu.ru>
6
6
  License: MIT
@@ -1,11 +1,11 @@
1
1
  diarama_api/__init__.py,sha256=cJmhN50DnymYRMg3aLptA7UsbEoXswRQoV8S8AlpphY,493
2
2
  diarama_api/auth.py,sha256=y5PkFDqMyD2FXQ0fepEzlS_XDAguLcS1fqq7lKkwV_Y,358
3
- diarama_api/client.py,sha256=bHlWKf04WJ7lc0fUdBoqYpXTkE_ha1FrGUztyQet_Yo,1061
3
+ diarama_api/client.py,sha256=lru2OnwZ0U8RzqfzmN8jiP9OTrstlc2tM6Lol-j4NPE,1247
4
4
  diarama_api/games.py,sha256=kYkkX0jHYftF6OZ2pSDns2eSenTyNu299CIgElNerAo,910
5
5
  diarama_api/media.py,sha256=rwiOX2QSt5grZpj25639t4w8oyeV0Xtu72h_FF_d4WU,500
6
6
  diarama_api/payments.py,sha256=kA9jTsJsSf2e0D3T517Xchmy-WNGtQdAOcDpbbvXkAM,738
7
7
  diarama_api/players.py,sha256=9ThcJKsQNhvBMvT6DI-rdxwfw4xa3C-9nTFEoNFFuLk,892
8
- diarama_api-0.1.11.dist-info/METADATA,sha256=gdlMNJ-am8lRLBp47EpR2G0OfPryY-YAQ-M8CHbdgXE,324
9
- diarama_api-0.1.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
- diarama_api-0.1.11.dist-info/top_level.txt,sha256=OcL6tQomtjFhzrraJ9GouJCWoc668jQEsqbUGxM8E7E,12
11
- diarama_api-0.1.11.dist-info/RECORD,,
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,,