parseapi 0.2.0__tar.gz → 0.2.1__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.
- {parseapi-0.2.0 → parseapi-0.2.1}/PKG-INFO +1 -1
- {parseapi-0.2.0 → parseapi-0.2.1}/pyproject.toml +1 -1
- {parseapi-0.2.0 → parseapi-0.2.1}/src/parseapi/__init__.py +1 -1
- {parseapi-0.2.0 → parseapi-0.2.1}/src/parseapi/_client.py +9 -9
- {parseapi-0.2.0 → parseapi-0.2.1}/.github/workflows/publish.yml +0 -0
- {parseapi-0.2.0 → parseapi-0.2.1}/.gitignore +0 -0
- {parseapi-0.2.0 → parseapi-0.2.1}/LICENSE +0 -0
- {parseapi-0.2.0 → parseapi-0.2.1}/README.md +0 -0
- {parseapi-0.2.0 → parseapi-0.2.1}/smoke/smoke.py +0 -0
- {parseapi-0.2.0 → parseapi-0.2.1}/tests/test_client.py +0 -0
|
@@ -8,7 +8,7 @@ from urllib.parse import quote
|
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
|
-
VERSION = "0.2.
|
|
11
|
+
VERSION = "0.2.1"
|
|
12
12
|
DEFAULT_BASE_URL = "https://api.parseapi.com"
|
|
13
13
|
DEFAULT_TIMEOUT = 10.0
|
|
14
14
|
DEFAULT_RETRIES = 2
|
|
@@ -115,7 +115,7 @@ class ParseAPI:
|
|
|
115
115
|
self.currency = _CurrencySync(self)
|
|
116
116
|
self.holiday = _HolidaySync(self)
|
|
117
117
|
self.emoji = _EmojiSync(self)
|
|
118
|
-
self.
|
|
118
|
+
self.tariff = _TariffSync(self)
|
|
119
119
|
|
|
120
120
|
def close(self) -> None:
|
|
121
121
|
self._http.close()
|
|
@@ -364,15 +364,15 @@ class _EmojiSync:
|
|
|
364
364
|
return self._client._get("/emoji", {"q": q, "limit": limit})
|
|
365
365
|
|
|
366
366
|
|
|
367
|
-
class
|
|
367
|
+
class _TariffSync:
|
|
368
368
|
def __init__(self, client: ParseAPI):
|
|
369
369
|
self._client = client
|
|
370
370
|
|
|
371
371
|
def __call__(self, code: str, *, deep: bool = False, origin: Optional[str] = None) -> Json:
|
|
372
|
-
return self._client._get(f"/
|
|
372
|
+
return self._client._get(f"/tariff/{_seg(code)}", {"deep": deep, "origin": origin})
|
|
373
373
|
|
|
374
374
|
def search(self, q: str) -> Json:
|
|
375
|
-
return self._client._get("/
|
|
375
|
+
return self._client._get("/tariff", {"q": q})
|
|
376
376
|
|
|
377
377
|
|
|
378
378
|
class AsyncParseAPI:
|
|
@@ -404,7 +404,7 @@ class AsyncParseAPI:
|
|
|
404
404
|
self.currency = _CurrencyAsync(self)
|
|
405
405
|
self.holiday = _HolidayAsync(self)
|
|
406
406
|
self.emoji = _EmojiAsync(self)
|
|
407
|
-
self.
|
|
407
|
+
self.tariff = _TariffAsync(self)
|
|
408
408
|
|
|
409
409
|
async def close(self) -> None:
|
|
410
410
|
await self._http.aclose()
|
|
@@ -657,12 +657,12 @@ class _EmojiAsync:
|
|
|
657
657
|
return await self._client._get("/emoji", {"q": q, "limit": limit})
|
|
658
658
|
|
|
659
659
|
|
|
660
|
-
class
|
|
660
|
+
class _TariffAsync:
|
|
661
661
|
def __init__(self, client: AsyncParseAPI):
|
|
662
662
|
self._client = client
|
|
663
663
|
|
|
664
664
|
async def __call__(self, code: str, *, deep: bool = False, origin: Optional[str] = None) -> Json:
|
|
665
|
-
return await self._client._get(f"/
|
|
665
|
+
return await self._client._get(f"/tariff/{_seg(code)}", {"deep": deep, "origin": origin})
|
|
666
666
|
|
|
667
667
|
async def search(self, q: str) -> Json:
|
|
668
|
-
return await self._client._get("/
|
|
668
|
+
return await self._client._get("/tariff", {"q": q})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|