update python samples

This commit is contained in:
William Cheng 2023-09-02 01:07:33 +08:00
parent 40731ed52d
commit a2177570b3
2 changed files with 14 additions and 12 deletions

View File

@ -1599,10 +1599,10 @@ class FakeApi:
:type uuid_example: str :type uuid_example: str
:param async_req: Whether to execute the request asynchronously. :param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional :type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one :param _request_timeout: timeout setting for this request.
number provided, it will be total request If one number provided, it will be total request
timeout. It can also be a pair (tuple) of timeout. It can also be a pair (tuple) of
(connection, read) timeouts. (connection, read) timeouts.
:return: Returns the result object. :return: Returns the result object.
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
@ -1610,7 +1610,8 @@ class FakeApi:
""" """
kwargs['_return_http_data_only'] = True kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs: if '_preload_content' in kwargs:
raise ValueError("Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") message = "Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
raise ValueError(message)
if async_req is not None: if async_req is not None:
kwargs['async_req'] = async_req kwargs['async_req'] = async_req
return self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501 return self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501

View File

@ -1490,10 +1490,10 @@ class FakeApi:
:type uuid_example: str :type uuid_example: str
:param async_req: Whether to execute the request asynchronously. :param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional :type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one :param _request_timeout: timeout setting for this request.
number provided, it will be total request If one number provided, it will be total request
timeout. It can also be a pair (tuple) of timeout. It can also be a pair (tuple) of
(connection, read) timeouts. (connection, read) timeouts.
:return: Returns the result object. :return: Returns the result object.
If the method is called asynchronously, If the method is called asynchronously,
returns the request thread. returns the request thread.
@ -1501,7 +1501,8 @@ class FakeApi:
""" """
kwargs['_return_http_data_only'] = True kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs: if '_preload_content' in kwargs:
raise ValueError("Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data") message = "Error! Please call the fake_uuid_example_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
raise ValueError(message)
return self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501 return self.fake_uuid_example_with_http_info(uuid_example, **kwargs) # noqa: E501
@validate_arguments @validate_arguments