pyEscoAPI 0.0.31__tar.gz → 0.0.33__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.
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/PKG-INFO +1 -1
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI/esco_api.py +5 -3
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI.egg-info/PKG-INFO +1 -1
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyproject.toml +1 -1
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/README.md +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI/__init__.py +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI/dataclasses.py +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI/exception.py +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI.egg-info/SOURCES.txt +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI.egg-info/dependency_links.txt +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI.egg-info/requires.txt +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/pyEscoAPI.egg-info/top_level.txt +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/setup.cfg +0 -0
- {pyescoapi-0.0.31 → pyescoapi-0.0.33}/tests/test_client.py +0 -0
|
@@ -64,7 +64,7 @@ class EscoAPI:
|
|
|
64
64
|
"json": request_body,
|
|
65
65
|
"headers": headers
|
|
66
66
|
}
|
|
67
|
-
result: Response = req_call(**params)
|
|
67
|
+
result: Response = req_call(**params, timeout=self.timeout)
|
|
68
68
|
if 200 <= result.status_code <= 299:
|
|
69
69
|
result_body = result.json()
|
|
70
70
|
logger.info("EscoAPI: Successful response", extra={
|
|
@@ -125,7 +125,8 @@ class EscoAPI:
|
|
|
125
125
|
username: str,
|
|
126
126
|
password: str,
|
|
127
127
|
client_id: str = "",
|
|
128
|
-
version: APIVersion = APIVersion.VERSION_9
|
|
128
|
+
version: APIVersion = APIVersion.VERSION_9,
|
|
129
|
+
timeout: int = 10
|
|
129
130
|
):
|
|
130
131
|
"""
|
|
131
132
|
Initializes the EscoAPI client, starting a login to the platform.
|
|
@@ -143,6 +144,7 @@ class EscoAPI:
|
|
|
143
144
|
self.password = password
|
|
144
145
|
self.client_id = client_id
|
|
145
146
|
self.version = version
|
|
147
|
+
self.timeout = timeout
|
|
146
148
|
|
|
147
149
|
self.__esco_login()
|
|
148
150
|
self._initialized = True
|
|
@@ -1898,7 +1900,7 @@ class EscoAPI:
|
|
|
1898
1900
|
self.__pre_connection()
|
|
1899
1901
|
return self.__make_request(
|
|
1900
1902
|
request_endpoint=f"/insert-cuenta-comitente",
|
|
1901
|
-
request_body=asdict(comitente_data),
|
|
1903
|
+
request_body=asdict(comitente_data, dict_factory=lambda x: {k: v for k, v in x if v is not None}),
|
|
1902
1904
|
request_method=HTTPMethod.POST
|
|
1903
1905
|
)
|
|
1904
1906
|
|
|
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
|