regula-facesdk-webclient 6.4.198.dev0__py3-none-any.whl
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.
Potentially problematic release.
This version of regula-facesdk-webclient might be problematic. Click here for more details.
- regula/__init__.py +0 -0
- regula/facesdk/__init__.py +0 -0
- regula/facesdk/webclient/__init__.py +15 -0
- regula/facesdk/webclient/ext/__init__.py +5 -0
- regula/facesdk/webclient/ext/api/__init__.py +3 -0
- regula/facesdk/webclient/ext/api/group_api.py +36 -0
- regula/facesdk/webclient/ext/api/match_api.py +46 -0
- regula/facesdk/webclient/ext/api/person_api.py +46 -0
- regula/facesdk/webclient/ext/api/sdk.py +28 -0
- regula/facesdk/webclient/ext/api/search_api.py +17 -0
- regula/facesdk/webclient/ext/common.py +7 -0
- regula/facesdk/webclient/ext/models/__init__.py +6 -0
- regula/facesdk/webclient/ext/models/detect_request.py +32 -0
- regula/facesdk/webclient/ext/models/match_image.py +19 -0
- regula/facesdk/webclient/ext/models/match_request.py +34 -0
- regula/facesdk/webclient/gen/__init__.py +27 -0
- regula/facesdk/webclient/gen/api/__init__.py +3 -0
- regula/facesdk/webclient/gen/api/diagnostics_api.py +162 -0
- regula/facesdk/webclient/gen/api/group_api.py +1040 -0
- regula/facesdk/webclient/gen/api/healthcheck_api.py +283 -0
- regula/facesdk/webclient/gen/api/liveness_2_0_api.py +168 -0
- regula/facesdk/webclient/gen/api/liveness_api.py +424 -0
- regula/facesdk/webclient/gen/api/match_api.py +463 -0
- regula/facesdk/webclient/gen/api/person_api.py +1345 -0
- regula/facesdk/webclient/gen/api/search_api.py +177 -0
- regula/facesdk/webclient/gen/api_client.py +695 -0
- regula/facesdk/webclient/gen/apis/__init__.py +22 -0
- regula/facesdk/webclient/gen/configuration.py +446 -0
- regula/facesdk/webclient/gen/exceptions.py +159 -0
- regula/facesdk/webclient/gen/model/__init__.py +5 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_request.py +205 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_request_image.py +204 -0
- regula/facesdk/webclient/gen/model/add_image_to_person_response.py +262 -0
- regula/facesdk/webclient/gen/model/attribute_config.py +120 -0
- regula/facesdk/webclient/gen/model/attribute_config_list.py +92 -0
- regula/facesdk/webclient/gen/model/crop.py +208 -0
- regula/facesdk/webclient/gen/model/detect_request.py +204 -0
- regula/facesdk/webclient/gen/model/detect_request_attributes.py +120 -0
- regula/facesdk/webclient/gen/model/detect_response.py +147 -0
- regula/facesdk/webclient/gen/model/detect_response_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/detect_result.py +231 -0
- regula/facesdk/webclient/gen/model/detection.py +258 -0
- regula/facesdk/webclient/gen/model/detection_attributes.py +148 -0
- regula/facesdk/webclient/gen/model/detection_face.py +260 -0
- regula/facesdk/webclient/gen/model/detection_quality.py +234 -0
- regula/facesdk/webclient/gen/model/device_info.py +231 -0
- regula/facesdk/webclient/gen/model/face_align_type_quality.py +109 -0
- regula/facesdk/webclient/gen/model/face_attribute.py +133 -0
- regula/facesdk/webclient/gen/model/face_image_quality_align_type.py +109 -0
- regula/facesdk/webclient/gen/model/face_image_quality_groups.py +118 -0
- regula/facesdk/webclient/gen/model/face_image_quality_groups_strings.py +118 -0
- regula/facesdk/webclient/gen/model/face_image_quality_status.py +103 -0
- regula/facesdk/webclient/gen/model/face_quality_config_name.py +238 -0
- regula/facesdk/webclient/gen/model/face_quality_scenarios.py +121 -0
- regula/facesdk/webclient/gen/model/face_quality_status.py +103 -0
- regula/facesdk/webclient/gen/model/face_rectangular.py +92 -0
- regula/facesdk/webclient/gen/model/face_sdk_result.py +121 -0
- regula/facesdk/webclient/gen/model/face_sdk_result_code.py +217 -0
- regula/facesdk/webclient/gen/model/faces_response.py +286 -0
- regula/facesdk/webclient/gen/model/faces_response_all_of.py +148 -0
- regula/facesdk/webclient/gen/model/filter_op.py +100 -0
- regula/facesdk/webclient/gen/model/filter_search_request.py +176 -0
- regula/facesdk/webclient/gen/model/group.py +206 -0
- regula/facesdk/webclient/gen/model/group_all_of.py +150 -0
- regula/facesdk/webclient/gen/model/group_page.py +178 -0
- regula/facesdk/webclient/gen/model/group_page_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/group_response.py +150 -0
- regula/facesdk/webclient/gen/model/group_to_create.py +180 -0
- regula/facesdk/webclient/gen/model/image.py +290 -0
- regula/facesdk/webclient/gen/model/image_fields.py +258 -0
- regula/facesdk/webclient/gen/model/image_fields_image.py +204 -0
- regula/facesdk/webclient/gen/model/image_page.py +176 -0
- regula/facesdk/webclient/gen/model/image_page_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/image_source.py +115 -0
- regula/facesdk/webclient/gen/model/liveness_transaction.py +334 -0
- regula/facesdk/webclient/gen/model/liveness_type.py +100 -0
- regula/facesdk/webclient/gen/model/match_and_search_request.py +178 -0
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/match_and_search_request_all_of_images.py +148 -0
- regula/facesdk/webclient/gen/model/match_and_search_response.py +233 -0
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of.py +206 -0
- regula/facesdk/webclient/gen/model/match_and_search_response_all_of_detections.py +176 -0
- regula/facesdk/webclient/gen/model/match_image.py +205 -0
- regula/facesdk/webclient/gen/model/match_image_detection.py +178 -0
- regula/facesdk/webclient/gen/model/match_image_result.py +316 -0
- regula/facesdk/webclient/gen/model/match_request.py +204 -0
- regula/facesdk/webclient/gen/model/match_request_output_image_params.py +148 -0
- regula/facesdk/webclient/gen/model/match_request_output_image_params_crop.py +212 -0
- regula/facesdk/webclient/gen/model/match_response.py +205 -0
- regula/facesdk/webclient/gen/model/match_response_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/operation_log.py +206 -0
- regula/facesdk/webclient/gen/model/output_image_params.py +146 -0
- regula/facesdk/webclient/gen/model/page.py +150 -0
- regula/facesdk/webclient/gen/model/person.py +318 -0
- regula/facesdk/webclient/gen/model/person_all_of.py +206 -0
- regula/facesdk/webclient/gen/model/person_created_response.py +178 -0
- regula/facesdk/webclient/gen/model/person_fields.py +234 -0
- regula/facesdk/webclient/gen/model/person_to_update_fields.py +206 -0
- regula/facesdk/webclient/gen/model/person_with_images.py +346 -0
- regula/facesdk/webclient/gen/model/person_with_images_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/persons_page.py +176 -0
- regula/facesdk/webclient/gen/model/persons_page_all_of.py +120 -0
- regula/facesdk/webclient/gen/model/process_param.py +226 -0
- regula/facesdk/webclient/gen/model/process_param_attributes.py +120 -0
- regula/facesdk/webclient/gen/model/quality_config.py +154 -0
- regula/facesdk/webclient/gen/model/quality_config_list.py +92 -0
- regula/facesdk/webclient/gen/model/quality_detail.py +234 -0
- regula/facesdk/webclient/gen/model/quality_details_groups.py +202 -0
- regula/facesdk/webclient/gen/model/quality_request.py +146 -0
- regula/facesdk/webclient/gen/model/recognize_image.py +346 -0
- regula/facesdk/webclient/gen/model/recognize_image_all_of.py +150 -0
- regula/facesdk/webclient/gen/model/resize_options.py +178 -0
- regula/facesdk/webclient/gen/model/rgb.py +92 -0
- regula/facesdk/webclient/gen/model/search_bad_params.py +172 -0
- regula/facesdk/webclient/gen/model/search_detection.py +398 -0
- regula/facesdk/webclient/gen/model/search_parameters.py +174 -0
- regula/facesdk/webclient/gen/model/search_parameters_create_person.py +177 -0
- regula/facesdk/webclient/gen/model/search_person.py +372 -0
- regula/facesdk/webclient/gen/model/search_person_all_of.py +148 -0
- regula/facesdk/webclient/gen/model/search_request.py +338 -0
- regula/facesdk/webclient/gen/model/search_request_all_of.py +178 -0
- regula/facesdk/webclient/gen/model/search_result.py +313 -0
- regula/facesdk/webclient/gen/model/search_result_all_of.py +122 -0
- regula/facesdk/webclient/gen/model/transaction_config.py +92 -0
- regula/facesdk/webclient/gen/model/transaction_info.py +344 -0
- regula/facesdk/webclient/gen/model/update_group.py +150 -0
- regula/facesdk/webclient/gen/model_utils.py +2037 -0
- regula/facesdk/webclient/gen/models/__init__.py +96 -0
- regula/facesdk/webclient/gen/rest.py +346 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/METADATA +73 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/RECORD +133 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/WHEEL +5 -0
- regula_facesdk_webclient-6.4.198.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Regula FaceSDK Web API
|
|
5
|
+
|
|
6
|
+
Regula FaceSDK Web API # Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core # noqa: E501
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 4.1.3
|
|
9
|
+
Generated by: https://openapi-generator.tech
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
from __future__ import absolute_import
|
|
14
|
+
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
|
|
17
|
+
# python 2 and python 3 compatibility library
|
|
18
|
+
import six
|
|
19
|
+
|
|
20
|
+
from regula.facesdk.webclient.gen.api_client import ApiClient
|
|
21
|
+
from regula.facesdk.webclient.gen.exceptions import ( # noqa: F401
|
|
22
|
+
ApiTypeError,
|
|
23
|
+
ApiValueError
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class LivenessApi(object):
|
|
28
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
29
|
+
Ref: https://openapi-generator.tech
|
|
30
|
+
|
|
31
|
+
Do not edit the class manually.
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
def __init__(self, api_client=None):
|
|
35
|
+
if api_client is None:
|
|
36
|
+
api_client = ApiClient()
|
|
37
|
+
self.api_client = api_client
|
|
38
|
+
|
|
39
|
+
def liveness_metadata(self, error_unknown, **kwargs): # noqa: E501
|
|
40
|
+
"""Liveness 2.0 metadata # noqa: E501
|
|
41
|
+
|
|
42
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
43
|
+
asynchronous HTTP request, please pass async_req=True
|
|
44
|
+
|
|
45
|
+
>>> thread = api.liveness_metadata(error_unknown, async_req=True)
|
|
46
|
+
>>> result = thread.get()
|
|
47
|
+
|
|
48
|
+
:param error_unknown: ID of the current liveness transaction. (required)
|
|
49
|
+
:type error_unknown: int
|
|
50
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
51
|
+
:type async_req: bool, optional
|
|
52
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
53
|
+
be returned without reading/decoding response
|
|
54
|
+
data. Default is True.
|
|
55
|
+
:type _preload_content: bool, optional
|
|
56
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
57
|
+
number provided, it will be total request
|
|
58
|
+
timeout. It can also be a pair (tuple) of
|
|
59
|
+
(connection, read) timeouts.
|
|
60
|
+
:return: Returns the result object.
|
|
61
|
+
If the method is called asynchronously,
|
|
62
|
+
returns the request thread.
|
|
63
|
+
:rtype: {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
|
|
64
|
+
"""
|
|
65
|
+
kwargs['_return_http_data_only'] = True
|
|
66
|
+
return self.liveness_metadata_with_http_info(error_unknown, **kwargs) # noqa: E501
|
|
67
|
+
|
|
68
|
+
def liveness_metadata_with_http_info(self, error_unknown, **kwargs): # noqa: E501
|
|
69
|
+
"""Liveness 2.0 metadata # noqa: E501
|
|
70
|
+
|
|
71
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
72
|
+
asynchronous HTTP request, please pass async_req=True
|
|
73
|
+
|
|
74
|
+
>>> thread = api.liveness_metadata_with_http_info(error_unknown, async_req=True)
|
|
75
|
+
>>> result = thread.get()
|
|
76
|
+
|
|
77
|
+
:param error_unknown: ID of the current liveness transaction. (required)
|
|
78
|
+
:type error_unknown: int
|
|
79
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
80
|
+
:type async_req: bool, optional
|
|
81
|
+
:param _return_http_data_only: response data without head status code
|
|
82
|
+
and headers
|
|
83
|
+
:type _return_http_data_only: bool, optional
|
|
84
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
85
|
+
be returned without reading/decoding response
|
|
86
|
+
data. Default is True.
|
|
87
|
+
:type _preload_content: bool, optional
|
|
88
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
89
|
+
number provided, it will be total request
|
|
90
|
+
timeout. It can also be a pair (tuple) of
|
|
91
|
+
(connection, read) timeouts.
|
|
92
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
93
|
+
request; this effectively ignores the authentication
|
|
94
|
+
in the spec for a single request.
|
|
95
|
+
:type _request_auth: dict, optional
|
|
96
|
+
:return: Returns the result object.
|
|
97
|
+
If the method is called asynchronously,
|
|
98
|
+
returns the request thread.
|
|
99
|
+
:rtype: tuple({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, status_code(int), headers(HTTPHeaderDict))
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
local_var_params = locals()
|
|
103
|
+
|
|
104
|
+
all_params = [
|
|
105
|
+
'error_unknown'
|
|
106
|
+
]
|
|
107
|
+
all_params.extend(
|
|
108
|
+
[
|
|
109
|
+
'async_req',
|
|
110
|
+
'_return_http_data_only',
|
|
111
|
+
'_preload_content',
|
|
112
|
+
'_request_timeout',
|
|
113
|
+
'_request_auth'
|
|
114
|
+
]
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
118
|
+
if key not in all_params:
|
|
119
|
+
raise ApiTypeError(
|
|
120
|
+
"Got an unexpected keyword argument '%s'"
|
|
121
|
+
" to method liveness_metadata" % key
|
|
122
|
+
)
|
|
123
|
+
local_var_params[key] = val
|
|
124
|
+
del local_var_params['kwargs']
|
|
125
|
+
# verify the required parameter 'error_unknown' is set
|
|
126
|
+
if self.api_client.client_side_validation and ('error_unknown' not in local_var_params or # noqa: E501
|
|
127
|
+
local_var_params['error_unknown'] is None): # noqa: E501
|
|
128
|
+
raise ApiValueError("Missing the required parameter `error_unknown` when calling `liveness_metadata`") # noqa: E501
|
|
129
|
+
|
|
130
|
+
collection_formats = {}
|
|
131
|
+
|
|
132
|
+
path_params = {}
|
|
133
|
+
|
|
134
|
+
query_params = []
|
|
135
|
+
if 'error_unknown' in local_var_params and local_var_params['error_unknown'] is not None: # noqa: E501
|
|
136
|
+
query_params.append(('', local_var_params['error_unknown'])) # noqa: E501
|
|
137
|
+
|
|
138
|
+
header_params = {}
|
|
139
|
+
|
|
140
|
+
form_params = []
|
|
141
|
+
local_var_files = {}
|
|
142
|
+
|
|
143
|
+
body_params = None
|
|
144
|
+
# HTTP header `Accept`
|
|
145
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
146
|
+
['application/json''application/octet-stream']) # noqa: E501
|
|
147
|
+
|
|
148
|
+
# Authentication setting
|
|
149
|
+
auth_settings = [] # noqa: E501
|
|
150
|
+
|
|
151
|
+
return self.api_client.call_api(
|
|
152
|
+
'/api/v2/liveness/metadata', 'GET',
|
|
153
|
+
path_params,
|
|
154
|
+
query_params,
|
|
155
|
+
header_params,
|
|
156
|
+
body=body_params,
|
|
157
|
+
post_params=form_params,
|
|
158
|
+
files=local_var_files,
|
|
159
|
+
response_type='{str: (bool, date, datetime, dict, float, int, list, str, none_type)}', # noqa: E501
|
|
160
|
+
auth_settings=auth_settings,
|
|
161
|
+
async_req=local_var_params.get('async_req'),
|
|
162
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
163
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
|
164
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
|
165
|
+
collection_formats=collection_formats,
|
|
166
|
+
_request_auth=local_var_params.get('_request_auth'))
|
|
167
|
+
|
|
168
|
+
def liveness_portrait(self, error_unknown, **kwargs): # noqa: E501
|
|
169
|
+
"""Liveness 2.0 portrait # noqa: E501
|
|
170
|
+
|
|
171
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
172
|
+
asynchronous HTTP request, please pass async_req=True
|
|
173
|
+
|
|
174
|
+
>>> thread = api.liveness_portrait(error_unknown, async_req=True)
|
|
175
|
+
>>> result = thread.get()
|
|
176
|
+
|
|
177
|
+
:param error_unknown: ID of the current liveness transaction. (required)
|
|
178
|
+
:type error_unknown: int
|
|
179
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
180
|
+
:type async_req: bool, optional
|
|
181
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
182
|
+
be returned without reading/decoding response
|
|
183
|
+
data. Default is True.
|
|
184
|
+
:type _preload_content: bool, optional
|
|
185
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
186
|
+
number provided, it will be total request
|
|
187
|
+
timeout. It can also be a pair (tuple) of
|
|
188
|
+
(connection, read) timeouts.
|
|
189
|
+
:return: Returns the result object.
|
|
190
|
+
If the method is called asynchronously,
|
|
191
|
+
returns the request thread.
|
|
192
|
+
:rtype: file_type
|
|
193
|
+
"""
|
|
194
|
+
kwargs['_return_http_data_only'] = True
|
|
195
|
+
return self.liveness_portrait_with_http_info(error_unknown, **kwargs) # noqa: E501
|
|
196
|
+
|
|
197
|
+
def liveness_portrait_with_http_info(self, error_unknown, **kwargs): # noqa: E501
|
|
198
|
+
"""Liveness 2.0 portrait # noqa: E501
|
|
199
|
+
|
|
200
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
201
|
+
asynchronous HTTP request, please pass async_req=True
|
|
202
|
+
|
|
203
|
+
>>> thread = api.liveness_portrait_with_http_info(error_unknown, async_req=True)
|
|
204
|
+
>>> result = thread.get()
|
|
205
|
+
|
|
206
|
+
:param error_unknown: ID of the current liveness transaction. (required)
|
|
207
|
+
:type error_unknown: int
|
|
208
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
209
|
+
:type async_req: bool, optional
|
|
210
|
+
:param _return_http_data_only: response data without head status code
|
|
211
|
+
and headers
|
|
212
|
+
:type _return_http_data_only: bool, optional
|
|
213
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
214
|
+
be returned without reading/decoding response
|
|
215
|
+
data. Default is True.
|
|
216
|
+
:type _preload_content: bool, optional
|
|
217
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
218
|
+
number provided, it will be total request
|
|
219
|
+
timeout. It can also be a pair (tuple) of
|
|
220
|
+
(connection, read) timeouts.
|
|
221
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
222
|
+
request; this effectively ignores the authentication
|
|
223
|
+
in the spec for a single request.
|
|
224
|
+
:type _request_auth: dict, optional
|
|
225
|
+
:return: Returns the result object.
|
|
226
|
+
If the method is called asynchronously,
|
|
227
|
+
returns the request thread.
|
|
228
|
+
:rtype: tuple(file_type, status_code(int), headers(HTTPHeaderDict))
|
|
229
|
+
"""
|
|
230
|
+
|
|
231
|
+
local_var_params = locals()
|
|
232
|
+
|
|
233
|
+
all_params = [
|
|
234
|
+
'error_unknown'
|
|
235
|
+
]
|
|
236
|
+
all_params.extend(
|
|
237
|
+
[
|
|
238
|
+
'async_req',
|
|
239
|
+
'_return_http_data_only',
|
|
240
|
+
'_preload_content',
|
|
241
|
+
'_request_timeout',
|
|
242
|
+
'_request_auth'
|
|
243
|
+
]
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
247
|
+
if key not in all_params:
|
|
248
|
+
raise ApiTypeError(
|
|
249
|
+
"Got an unexpected keyword argument '%s'"
|
|
250
|
+
" to method liveness_portrait" % key
|
|
251
|
+
)
|
|
252
|
+
local_var_params[key] = val
|
|
253
|
+
del local_var_params['kwargs']
|
|
254
|
+
# verify the required parameter 'error_unknown' is set
|
|
255
|
+
if self.api_client.client_side_validation and ('error_unknown' not in local_var_params or # noqa: E501
|
|
256
|
+
local_var_params['error_unknown'] is None): # noqa: E501
|
|
257
|
+
raise ApiValueError("Missing the required parameter `error_unknown` when calling `liveness_portrait`") # noqa: E501
|
|
258
|
+
|
|
259
|
+
collection_formats = {}
|
|
260
|
+
|
|
261
|
+
path_params = {}
|
|
262
|
+
|
|
263
|
+
query_params = []
|
|
264
|
+
if 'error_unknown' in local_var_params and local_var_params['error_unknown'] is not None: # noqa: E501
|
|
265
|
+
query_params.append(('', local_var_params['error_unknown'])) # noqa: E501
|
|
266
|
+
|
|
267
|
+
header_params = {}
|
|
268
|
+
|
|
269
|
+
form_params = []
|
|
270
|
+
local_var_files = {}
|
|
271
|
+
|
|
272
|
+
body_params = None
|
|
273
|
+
# HTTP header `Accept`
|
|
274
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
275
|
+
['application/octet-stream']) # noqa: E501
|
|
276
|
+
|
|
277
|
+
# Authentication setting
|
|
278
|
+
auth_settings = [] # noqa: E501
|
|
279
|
+
|
|
280
|
+
return self.api_client.call_api(
|
|
281
|
+
'/api/v2/liveness/portrait', 'GET',
|
|
282
|
+
path_params,
|
|
283
|
+
query_params,
|
|
284
|
+
header_params,
|
|
285
|
+
body=body_params,
|
|
286
|
+
post_params=form_params,
|
|
287
|
+
files=local_var_files,
|
|
288
|
+
response_type='file_type', # noqa: E501
|
|
289
|
+
auth_settings=auth_settings,
|
|
290
|
+
async_req=local_var_params.get('async_req'),
|
|
291
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
292
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
|
293
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
|
294
|
+
collection_formats=collection_formats,
|
|
295
|
+
_request_auth=local_var_params.get('_request_auth'))
|
|
296
|
+
|
|
297
|
+
def liveness_video(self, error_unknown, **kwargs): # noqa: E501
|
|
298
|
+
"""Liveness 2.0 video # noqa: E501
|
|
299
|
+
|
|
300
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
301
|
+
asynchronous HTTP request, please pass async_req=True
|
|
302
|
+
|
|
303
|
+
>>> thread = api.liveness_video(error_unknown, async_req=True)
|
|
304
|
+
>>> result = thread.get()
|
|
305
|
+
|
|
306
|
+
:param error_unknown: ID of the current liveness transaction. (required)
|
|
307
|
+
:type error_unknown: int
|
|
308
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
309
|
+
:type async_req: bool, optional
|
|
310
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
311
|
+
be returned without reading/decoding response
|
|
312
|
+
data. Default is True.
|
|
313
|
+
:type _preload_content: bool, optional
|
|
314
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
315
|
+
number provided, it will be total request
|
|
316
|
+
timeout. It can also be a pair (tuple) of
|
|
317
|
+
(connection, read) timeouts.
|
|
318
|
+
:return: Returns the result object.
|
|
319
|
+
If the method is called asynchronously,
|
|
320
|
+
returns the request thread.
|
|
321
|
+
:rtype: file_type
|
|
322
|
+
"""
|
|
323
|
+
kwargs['_return_http_data_only'] = True
|
|
324
|
+
return self.liveness_video_with_http_info(error_unknown, **kwargs) # noqa: E501
|
|
325
|
+
|
|
326
|
+
def liveness_video_with_http_info(self, error_unknown, **kwargs): # noqa: E501
|
|
327
|
+
"""Liveness 2.0 video # noqa: E501
|
|
328
|
+
|
|
329
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
330
|
+
asynchronous HTTP request, please pass async_req=True
|
|
331
|
+
|
|
332
|
+
>>> thread = api.liveness_video_with_http_info(error_unknown, async_req=True)
|
|
333
|
+
>>> result = thread.get()
|
|
334
|
+
|
|
335
|
+
:param error_unknown: ID of the current liveness transaction. (required)
|
|
336
|
+
:type error_unknown: int
|
|
337
|
+
:param async_req: Whether to execute the request asynchronously.
|
|
338
|
+
:type async_req: bool, optional
|
|
339
|
+
:param _return_http_data_only: response data without head status code
|
|
340
|
+
and headers
|
|
341
|
+
:type _return_http_data_only: bool, optional
|
|
342
|
+
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
343
|
+
be returned without reading/decoding response
|
|
344
|
+
data. Default is True.
|
|
345
|
+
:type _preload_content: bool, optional
|
|
346
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
347
|
+
number provided, it will be total request
|
|
348
|
+
timeout. It can also be a pair (tuple) of
|
|
349
|
+
(connection, read) timeouts.
|
|
350
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
351
|
+
request; this effectively ignores the authentication
|
|
352
|
+
in the spec for a single request.
|
|
353
|
+
:type _request_auth: dict, optional
|
|
354
|
+
:return: Returns the result object.
|
|
355
|
+
If the method is called asynchronously,
|
|
356
|
+
returns the request thread.
|
|
357
|
+
:rtype: tuple(file_type, status_code(int), headers(HTTPHeaderDict))
|
|
358
|
+
"""
|
|
359
|
+
|
|
360
|
+
local_var_params = locals()
|
|
361
|
+
|
|
362
|
+
all_params = [
|
|
363
|
+
'error_unknown'
|
|
364
|
+
]
|
|
365
|
+
all_params.extend(
|
|
366
|
+
[
|
|
367
|
+
'async_req',
|
|
368
|
+
'_return_http_data_only',
|
|
369
|
+
'_preload_content',
|
|
370
|
+
'_request_timeout',
|
|
371
|
+
'_request_auth'
|
|
372
|
+
]
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
for key, val in six.iteritems(local_var_params['kwargs']):
|
|
376
|
+
if key not in all_params:
|
|
377
|
+
raise ApiTypeError(
|
|
378
|
+
"Got an unexpected keyword argument '%s'"
|
|
379
|
+
" to method liveness_video" % key
|
|
380
|
+
)
|
|
381
|
+
local_var_params[key] = val
|
|
382
|
+
del local_var_params['kwargs']
|
|
383
|
+
# verify the required parameter 'error_unknown' is set
|
|
384
|
+
if self.api_client.client_side_validation and ('error_unknown' not in local_var_params or # noqa: E501
|
|
385
|
+
local_var_params['error_unknown'] is None): # noqa: E501
|
|
386
|
+
raise ApiValueError("Missing the required parameter `error_unknown` when calling `liveness_video`") # noqa: E501
|
|
387
|
+
|
|
388
|
+
collection_formats = {}
|
|
389
|
+
|
|
390
|
+
path_params = {}
|
|
391
|
+
|
|
392
|
+
query_params = []
|
|
393
|
+
if 'error_unknown' in local_var_params and local_var_params['error_unknown'] is not None: # noqa: E501
|
|
394
|
+
query_params.append(('', local_var_params['error_unknown'])) # noqa: E501
|
|
395
|
+
|
|
396
|
+
header_params = {}
|
|
397
|
+
|
|
398
|
+
form_params = []
|
|
399
|
+
local_var_files = {}
|
|
400
|
+
|
|
401
|
+
body_params = None
|
|
402
|
+
# HTTP header `Accept`
|
|
403
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
404
|
+
['application/octet-stream']) # noqa: E501
|
|
405
|
+
|
|
406
|
+
# Authentication setting
|
|
407
|
+
auth_settings = [] # noqa: E501
|
|
408
|
+
|
|
409
|
+
return self.api_client.call_api(
|
|
410
|
+
'/api/v2/liveness/video', 'GET',
|
|
411
|
+
path_params,
|
|
412
|
+
query_params,
|
|
413
|
+
header_params,
|
|
414
|
+
body=body_params,
|
|
415
|
+
post_params=form_params,
|
|
416
|
+
files=local_var_files,
|
|
417
|
+
response_type='file_type', # noqa: E501
|
|
418
|
+
auth_settings=auth_settings,
|
|
419
|
+
async_req=local_var_params.get('async_req'),
|
|
420
|
+
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
|
|
421
|
+
_preload_content=local_var_params.get('_preload_content', True),
|
|
422
|
+
_request_timeout=local_var_params.get('_request_timeout'),
|
|
423
|
+
collection_formats=collection_formats,
|
|
424
|
+
_request_auth=local_var_params.get('_request_auth'))
|