Skip to content

Commit 76aaaf4

Browse files
committed
Revert "added support for async and tests for all api services"
This reverts commit 78eec34.
1 parent 78eec34 commit 76aaaf4

12 files changed

+187
-1552
lines changed

monday_code/api/environment_variables_api.py

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from monday_code.api_client import ApiClient, RequestSerialized
2323
from monday_code.api_response import ApiResponse
2424
from monday_code.rest import RESTResponseType
25-
from monday_code.sdk_logger import log_sdk_usage
2625

2726

2827
class EnvironmentVariablesApi:
@@ -37,6 +36,7 @@ def __init__(self, api_client=None) -> None:
3736
api_client = ApiClient.get_default()
3837
self.api_client = api_client
3938

39+
4040
@validate_call
4141
async def get_environment_variable(
4242
self,
@@ -79,10 +79,7 @@ async def get_environment_variable(
7979
in the spec for a single request.
8080
:type _host_index: int, optional
8181
:return: Returns the result object.
82-
""" # noqa: E501
83-
84-
# Log environment variable usage
85-
log_sdk_usage(f"🌍 Getting environment variable: '{name}'")
82+
""" # noqa: E501
8683

8784
_param = self._get_environment_variable_serialize(
8885
name=name,
@@ -106,6 +103,7 @@ async def get_environment_variable(
106103
response_types_map=_response_types_map,
107104
).data
108105

106+
109107
@validate_call
110108
async def get_environment_variable_with_http_info(
111109
self,
@@ -148,7 +146,7 @@ async def get_environment_variable_with_http_info(
148146
in the spec for a single request.
149147
:type _host_index: int, optional
150148
:return: Returns the result object.
151-
""" # noqa: E501
149+
""" # noqa: E501
152150

153151
_param = self._get_environment_variable_serialize(
154152
name=name,
@@ -172,6 +170,7 @@ async def get_environment_variable_with_http_info(
172170
response_types_map=_response_types_map,
173171
)
174172

173+
175174
@validate_call
176175
async def get_environment_variable_without_preload_content(
177176
self,
@@ -214,7 +213,7 @@ async def get_environment_variable_without_preload_content(
214213
in the spec for a single request.
215214
:type _host_index: int, optional
216215
:return: Returns the result object.
217-
""" # noqa: E501
216+
""" # noqa: E501
218217

219218
_param = self._get_environment_variable_serialize(
220219
name=name,
@@ -234,6 +233,7 @@ async def get_environment_variable_without_preload_content(
234233
)
235234
return response_data.response
236235

236+
237237
def _get_environment_variable_serialize(
238238
self,
239239
name,
@@ -265,6 +265,7 @@ def _get_environment_variable_serialize(
265265
# process the form parameters
266266
# process the body parameter
267267

268+
268269
# set the HTTP header `Accept`
269270
if 'Accept' not in _header_params:
270271
_header_params['Accept'] = self.api_client.select_header_accept(
@@ -273,6 +274,7 @@ def _get_environment_variable_serialize(
273274
]
274275
)
275276

277+
276278
# authentication setting
277279
_auth_settings: List[str] = [
278280
]
@@ -292,6 +294,9 @@ def _get_environment_variable_serialize(
292294
_request_auth=_request_auth
293295
)
294296

297+
298+
299+
295300
@validate_call
296301
async def get_environment_variable_keys(
297302
self,
@@ -331,10 +336,7 @@ async def get_environment_variable_keys(
331336
in the spec for a single request.
332337
:type _host_index: int, optional
333338
:return: Returns the result object.
334-
""" # noqa: E501
335-
336-
# Log environment variable usage
337-
log_sdk_usage("🌍 Getting all environment variable keys")
339+
""" # noqa: E501
338340

339341
_param = self._get_environment_variable_keys_serialize(
340342
_request_auth=_request_auth,
@@ -356,6 +358,7 @@ async def get_environment_variable_keys(
356358
response_types_map=_response_types_map,
357359
).data
358360

361+
359362
@validate_call
360363
async def get_environment_variable_keys_with_http_info(
361364
self,
@@ -395,7 +398,7 @@ async def get_environment_variable_keys_with_http_info(
395398
in the spec for a single request.
396399
:type _host_index: int, optional
397400
:return: Returns the result object.
398-
""" # noqa: E501
401+
""" # noqa: E501
399402

400403
_param = self._get_environment_variable_keys_serialize(
401404
_request_auth=_request_auth,
@@ -417,6 +420,7 @@ async def get_environment_variable_keys_with_http_info(
417420
response_types_map=_response_types_map,
418421
)
419422

423+
420424
@validate_call
421425
async def get_environment_variable_keys_without_preload_content(
422426
self,
@@ -456,7 +460,7 @@ async def get_environment_variable_keys_without_preload_content(
456460
in the spec for a single request.
457461
:type _host_index: int, optional
458462
:return: Returns the result object.
459-
""" # noqa: E501
463+
""" # noqa: E501
460464

461465
_param = self._get_environment_variable_keys_serialize(
462466
_request_auth=_request_auth,
@@ -474,6 +478,7 @@ async def get_environment_variable_keys_without_preload_content(
474478
)
475479
return response_data.response
476480

481+
477482
def _get_environment_variable_keys_serialize(
478483
self,
479484
_request_auth,
@@ -502,6 +507,7 @@ def _get_environment_variable_keys_serialize(
502507
# process the form parameters
503508
# process the body parameter
504509

510+
505511
# set the HTTP header `Accept`
506512
if 'Accept' not in _header_params:
507513
_header_params['Accept'] = self.api_client.select_header_accept(
@@ -510,6 +516,7 @@ def _get_environment_variable_keys_serialize(
510516
]
511517
)
512518

519+
513520
# authentication setting
514521
_auth_settings: List[str] = [
515522
]
@@ -528,3 +535,5 @@ def _get_environment_variable_keys_serialize(
528535
_host=_host,
529536
_request_auth=_request_auth
530537
)
538+
539+

monday_code/api/logs_api.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
from monday_code.api_client import ApiClient, RequestSerialized
2222
from monday_code.api_response import ApiResponse
2323
from monday_code.rest import RESTResponseType
24-
from monday_code.sdk_logger import log_sdk_usage
2524

2625

2726
class LogsApi:
@@ -36,6 +35,7 @@ def __init__(self, api_client=None) -> None:
3635
api_client = ApiClient.get_default()
3736
self.api_client = api_client
3837

38+
3939
@validate_call
4040
async def write_log(
4141
self,
@@ -78,10 +78,7 @@ async def write_log(
7878
in the spec for a single request.
7979
:type _host_index: int, optional
8080
:return: Returns the result object.
81-
""" # noqa: E501
82-
83-
# Log write operation
84-
log_sdk_usage("📝 Writing log entry")
81+
""" # noqa: E501
8582

8683
_param = self._write_log_serialize(
8784
write_log_request_body=write_log_request_body,
@@ -104,6 +101,7 @@ async def write_log(
104101
response_types_map=_response_types_map,
105102
).data
106103

104+
107105
@validate_call
108106
async def write_log_with_http_info(
109107
self,
@@ -146,7 +144,7 @@ async def write_log_with_http_info(
146144
in the spec for a single request.
147145
:type _host_index: int, optional
148146
:return: Returns the result object.
149-
""" # noqa: E501
147+
""" # noqa: E501
150148

151149
_param = self._write_log_serialize(
152150
write_log_request_body=write_log_request_body,
@@ -169,6 +167,7 @@ async def write_log_with_http_info(
169167
response_types_map=_response_types_map,
170168
)
171169

170+
172171
@validate_call
173172
async def write_log_without_preload_content(
174173
self,
@@ -211,7 +210,7 @@ async def write_log_without_preload_content(
211210
in the spec for a single request.
212211
:type _host_index: int, optional
213212
:return: Returns the result object.
214-
""" # noqa: E501
213+
""" # noqa: E501
215214

216215
_param = self._write_log_serialize(
217216
write_log_request_body=write_log_request_body,
@@ -230,6 +229,7 @@ async def write_log_without_preload_content(
230229
)
231230
return response_data.response
232231

232+
233233
def _write_log_serialize(
234234
self,
235235
write_log_request_body,
@@ -261,6 +261,8 @@ def _write_log_serialize(
261261
if write_log_request_body is not None:
262262
_body_params = write_log_request_body
263263

264+
265+
264266
# set the HTTP header `Content-Type`
265267
if _content_type:
266268
_header_params['Content-Type'] = _content_type
@@ -293,3 +295,5 @@ def _write_log_serialize(
293295
_host=_host,
294296
_request_auth=_request_auth
295297
)
298+
299+

0 commit comments

Comments
 (0)