@@ -30,145 +30,6 @@ def __init__(self, api_client=None):
3030 api_client = ApiClient ()
3131 self .api_client = api_client
3232
33- def api_process (self , process_request , ** kwargs ): # noqa: E501
34- """Process list of documents images and return extracted data # noqa: E501
35-
36- This method makes a synchronous HTTP request by default. To make an
37- asynchronous HTTP request, please pass async_req=True
38-
39- >>> thread = api.api_process(process_request, async_req=True)
40- >>> result = thread.get()
41-
42- :param process_request: (required)
43- :type process_request: ProcessRequest
44- :param async_req: Whether to execute the request asynchronously.
45- :type async_req: bool, optional
46- :param _preload_content: if False, the urllib3.HTTPResponse object will
47- be returned without reading/decoding response
48- data. Default is True.
49- :type _preload_content: bool, optional
50- :param _request_timeout: timeout setting for this request. If one
51- number provided, it will be total request
52- timeout. It can also be a pair (tuple) of
53- (connection, read) timeouts.
54- :return: Returns the result object.
55- If the method is called asynchronously,
56- returns the request thread.
57- :rtype: ProcessResponse
58- """
59- kwargs ['_return_http_data_only' ] = True
60- return self .api_process_with_http_info (process_request , ** kwargs ) # noqa: E501
61-
62- def api_process_with_http_info (self , process_request , ** kwargs ): # noqa: E501
63- """Process list of documents images and return extracted data # noqa: E501
64-
65- This method makes a synchronous HTTP request by default. To make an
66- asynchronous HTTP request, please pass async_req=True
67-
68- >>> thread = api.api_process_with_http_info(process_request, async_req=True)
69- >>> result = thread.get()
70-
71- :param process_request: (required)
72- :type process_request: ProcessRequest
73- :param async_req: Whether to execute the request asynchronously.
74- :type async_req: bool, optional
75- :param _return_http_data_only: response data without head status code
76- and headers
77- :type _return_http_data_only: bool, optional
78- :param _preload_content: if False, the urllib3.HTTPResponse object will
79- be returned without reading/decoding response
80- data. Default is True.
81- :type _preload_content: bool, optional
82- :param _request_timeout: timeout setting for this request. If one
83- number provided, it will be total request
84- timeout. It can also be a pair (tuple) of
85- (connection, read) timeouts.
86- :param _request_auth: set to override the auth_settings for an a single
87- request; this effectively ignores the authentication
88- in the spec for a single request.
89- :type _request_auth: dict, optional
90- :return: Returns the result object.
91- If the method is called asynchronously,
92- returns the request thread.
93- :rtype: tuple(ProcessResponse, status_code(int), headers(HTTPHeaderDict))
94- """
95-
96- local_var_params = locals ()
97-
98- all_params = [
99- 'process_request'
100- ]
101- all_params .extend (
102- [
103- 'async_req' ,
104- '_return_http_data_only' ,
105- '_preload_content' ,
106- '_request_timeout' ,
107- '_request_auth'
108- ]
109- )
110-
111- for key , val in six .iteritems (local_var_params ['kwargs' ]):
112- if key not in all_params :
113- raise ApiTypeError (
114- "Got an unexpected keyword argument '%s'"
115- " to method api_process" % key
116- )
117- local_var_params [key ] = val
118- del local_var_params ['kwargs' ]
119- # verify the required parameter 'process_request' is set
120- if self .api_client .client_side_validation and ('process_request' not in local_var_params or # noqa: E501
121- local_var_params ['process_request' ] is None ): # noqa: E501
122- raise ApiValueError ("Missing the required parameter `process_request` when calling `api_process`" ) # noqa: E501
123-
124- collection_formats = {}
125-
126- path_params = {}
127-
128- query_params = []
129-
130- header_params = {}
131-
132- form_params = []
133- local_var_files = {}
134-
135- body_params = None
136- if 'process_request' in local_var_params :
137- body_params = local_var_params ['process_request' ]
138- # HTTP header `Accept`
139- header_params ['Accept' ] = self .api_client .select_header_accept (
140- ['application/json' ]) # noqa: E501
141-
142- # HTTP header `Content-Type`
143- header_params ['Content-Type' ] = self .api_client .select_header_content_type ( # noqa: E501
144- ['application/json' ]) # noqa: E501
145-
146- # Authentication setting
147- auth_settings = [] # noqa: E501
148-
149- response_types_map = {
150- 200 : "ProcessResponse" ,
151- 400 : None ,
152- 403 : None ,
153- }
154-
155- return self .api_client .call_api (
156- '/api/process' , 'POST' ,
157- path_params ,
158- query_params ,
159- header_params ,
160- body = body_params ,
161- post_params = form_params ,
162- files = local_var_files ,
163- response_types_map = response_types_map ,
164- auth_settings = auth_settings ,
165- async_req = local_var_params .get ('async_req' ),
166- _return_http_data_only = local_var_params .get ('_return_http_data_only' ), # noqa: E501
167- _preload_content = local_var_params .get ('_preload_content' , True ),
168- _request_timeout = local_var_params .get ('_request_timeout' ),
169- collection_formats = collection_formats ,
170- _request_auth = local_var_params .get ('_request_auth' ))
171-
17233 def ping (self , ** kwargs ): # noqa: E501
17334 """Server health check # noqa: E501
17435
0 commit comments