rapidata 2.14.1__py3-none-any.whl → 2.15.0__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 rapidata might be problematic. Click here for more details.
- rapidata/api_client/__init__.py +1 -0
- rapidata/api_client/api/campaign_api.py +252 -0
- rapidata/api_client/api/order_api.py +252 -0
- rapidata/api_client/api/validation_api.py +283 -0
- rapidata/api_client/models/__init__.py +1 -0
- rapidata/api_client/models/add_campaign_model.py +9 -2
- rapidata/api_client/models/campaign_query_result.py +2 -2
- rapidata/api_client/models/campaign_status.py +1 -0
- rapidata/api_client/models/create_order_model.py +15 -1
- rapidata/api_client/models/evaluation_workflow_model.py +1 -1
- rapidata/api_client/models/order_model.py +2 -2
- rapidata/api_client/models/order_state.py +1 -0
- rapidata/api_client/models/update_dimensions_model.py +87 -0
- rapidata/api_client_README.md +8 -3
- rapidata/rapidata_client/demographic/demographic_manager.py +35 -0
- rapidata/rapidata_client/order/_rapidata_order_builder.py +2 -0
- rapidata/rapidata_client/order/rapidata_order.py +3 -5
- rapidata/rapidata_client/order/rapidata_order_manager.py +10 -1
- {rapidata-2.14.1.dist-info → rapidata-2.15.0.dist-info}/METADATA +1 -1
- {rapidata-2.14.1.dist-info → rapidata-2.15.0.dist-info}/RECORD +22 -21
- {rapidata-2.14.1.dist-info → rapidata-2.15.0.dist-info}/LICENSE +0 -0
- {rapidata-2.14.1.dist-info → rapidata-2.15.0.dist-info}/WHEEL +0 -0
rapidata/api_client/__init__.py
CHANGED
|
@@ -295,6 +295,7 @@ from rapidata.api_client.models.translated_string import TranslatedString
|
|
|
295
295
|
from rapidata.api_client.models.unlock_order_result import UnlockOrderResult
|
|
296
296
|
from rapidata.api_client.models.update_access_model import UpdateAccessModel
|
|
297
297
|
from rapidata.api_client.models.update_campaign_model import UpdateCampaignModel
|
|
298
|
+
from rapidata.api_client.models.update_dimensions_model import UpdateDimensionsModel
|
|
298
299
|
from rapidata.api_client.models.update_order_model import UpdateOrderModel
|
|
299
300
|
from rapidata.api_client.models.update_validation_rapid_model import UpdateValidationRapidModel
|
|
300
301
|
from rapidata.api_client.models.update_validation_rapid_model_truth import UpdateValidationRapidModelTruth
|
|
@@ -40,6 +40,258 @@ class CampaignApi:
|
|
|
40
40
|
self.api_client = api_client
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
@validate_call
|
|
44
|
+
def campaign_campaign_id_release_post(
|
|
45
|
+
self,
|
|
46
|
+
campaign_id: Annotated[StrictStr, Field(description="The campaign id that should be released")],
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> None:
|
|
60
|
+
"""Releases a campaign from the preview state. This will make the campaign available for the users to be labeled.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:param campaign_id: The campaign id that should be released (required)
|
|
64
|
+
:type campaign_id: str
|
|
65
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
66
|
+
number provided, it will be total request
|
|
67
|
+
timeout. It can also be a pair (tuple) of
|
|
68
|
+
(connection, read) timeouts.
|
|
69
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
70
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
71
|
+
request; this effectively ignores the
|
|
72
|
+
authentication in the spec for a single request.
|
|
73
|
+
:type _request_auth: dict, optional
|
|
74
|
+
:param _content_type: force content-type for the request.
|
|
75
|
+
:type _content_type: str, Optional
|
|
76
|
+
:param _headers: set to override the headers for a single
|
|
77
|
+
request; this effectively ignores the headers
|
|
78
|
+
in the spec for a single request.
|
|
79
|
+
:type _headers: dict, optional
|
|
80
|
+
:param _host_index: set to override the host_index for a single
|
|
81
|
+
request; this effectively ignores the host_index
|
|
82
|
+
in the spec for a single request.
|
|
83
|
+
:type _host_index: int, optional
|
|
84
|
+
:return: Returns the result object.
|
|
85
|
+
""" # noqa: E501
|
|
86
|
+
|
|
87
|
+
_param = self._campaign_campaign_id_release_post_serialize(
|
|
88
|
+
campaign_id=campaign_id,
|
|
89
|
+
_request_auth=_request_auth,
|
|
90
|
+
_content_type=_content_type,
|
|
91
|
+
_headers=_headers,
|
|
92
|
+
_host_index=_host_index
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
96
|
+
'204': None,
|
|
97
|
+
}
|
|
98
|
+
response_data = self.api_client.call_api(
|
|
99
|
+
*_param,
|
|
100
|
+
_request_timeout=_request_timeout
|
|
101
|
+
)
|
|
102
|
+
response_data.read()
|
|
103
|
+
return self.api_client.response_deserialize(
|
|
104
|
+
response_data=response_data,
|
|
105
|
+
response_types_map=_response_types_map,
|
|
106
|
+
).data
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@validate_call
|
|
110
|
+
def campaign_campaign_id_release_post_with_http_info(
|
|
111
|
+
self,
|
|
112
|
+
campaign_id: Annotated[StrictStr, Field(description="The campaign id that should be released")],
|
|
113
|
+
_request_timeout: Union[
|
|
114
|
+
None,
|
|
115
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
116
|
+
Tuple[
|
|
117
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
118
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
119
|
+
]
|
|
120
|
+
] = None,
|
|
121
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
122
|
+
_content_type: Optional[StrictStr] = None,
|
|
123
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
124
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
125
|
+
) -> ApiResponse[None]:
|
|
126
|
+
"""Releases a campaign from the preview state. This will make the campaign available for the users to be labeled.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
:param campaign_id: The campaign id that should be released (required)
|
|
130
|
+
:type campaign_id: str
|
|
131
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
132
|
+
number provided, it will be total request
|
|
133
|
+
timeout. It can also be a pair (tuple) of
|
|
134
|
+
(connection, read) timeouts.
|
|
135
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
136
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
137
|
+
request; this effectively ignores the
|
|
138
|
+
authentication in the spec for a single request.
|
|
139
|
+
:type _request_auth: dict, optional
|
|
140
|
+
:param _content_type: force content-type for the request.
|
|
141
|
+
:type _content_type: str, Optional
|
|
142
|
+
:param _headers: set to override the headers for a single
|
|
143
|
+
request; this effectively ignores the headers
|
|
144
|
+
in the spec for a single request.
|
|
145
|
+
:type _headers: dict, optional
|
|
146
|
+
:param _host_index: set to override the host_index for a single
|
|
147
|
+
request; this effectively ignores the host_index
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _host_index: int, optional
|
|
150
|
+
:return: Returns the result object.
|
|
151
|
+
""" # noqa: E501
|
|
152
|
+
|
|
153
|
+
_param = self._campaign_campaign_id_release_post_serialize(
|
|
154
|
+
campaign_id=campaign_id,
|
|
155
|
+
_request_auth=_request_auth,
|
|
156
|
+
_content_type=_content_type,
|
|
157
|
+
_headers=_headers,
|
|
158
|
+
_host_index=_host_index
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
162
|
+
'204': None,
|
|
163
|
+
}
|
|
164
|
+
response_data = self.api_client.call_api(
|
|
165
|
+
*_param,
|
|
166
|
+
_request_timeout=_request_timeout
|
|
167
|
+
)
|
|
168
|
+
response_data.read()
|
|
169
|
+
return self.api_client.response_deserialize(
|
|
170
|
+
response_data=response_data,
|
|
171
|
+
response_types_map=_response_types_map,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
@validate_call
|
|
176
|
+
def campaign_campaign_id_release_post_without_preload_content(
|
|
177
|
+
self,
|
|
178
|
+
campaign_id: Annotated[StrictStr, Field(description="The campaign id that should be released")],
|
|
179
|
+
_request_timeout: Union[
|
|
180
|
+
None,
|
|
181
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
182
|
+
Tuple[
|
|
183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
184
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
185
|
+
]
|
|
186
|
+
] = None,
|
|
187
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
188
|
+
_content_type: Optional[StrictStr] = None,
|
|
189
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
190
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
191
|
+
) -> RESTResponseType:
|
|
192
|
+
"""Releases a campaign from the preview state. This will make the campaign available for the users to be labeled.
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
:param campaign_id: The campaign id that should be released (required)
|
|
196
|
+
:type campaign_id: str
|
|
197
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
198
|
+
number provided, it will be total request
|
|
199
|
+
timeout. It can also be a pair (tuple) of
|
|
200
|
+
(connection, read) timeouts.
|
|
201
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
202
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
203
|
+
request; this effectively ignores the
|
|
204
|
+
authentication in the spec for a single request.
|
|
205
|
+
:type _request_auth: dict, optional
|
|
206
|
+
:param _content_type: force content-type for the request.
|
|
207
|
+
:type _content_type: str, Optional
|
|
208
|
+
:param _headers: set to override the headers for a single
|
|
209
|
+
request; this effectively ignores the headers
|
|
210
|
+
in the spec for a single request.
|
|
211
|
+
:type _headers: dict, optional
|
|
212
|
+
:param _host_index: set to override the host_index for a single
|
|
213
|
+
request; this effectively ignores the host_index
|
|
214
|
+
in the spec for a single request.
|
|
215
|
+
:type _host_index: int, optional
|
|
216
|
+
:return: Returns the result object.
|
|
217
|
+
""" # noqa: E501
|
|
218
|
+
|
|
219
|
+
_param = self._campaign_campaign_id_release_post_serialize(
|
|
220
|
+
campaign_id=campaign_id,
|
|
221
|
+
_request_auth=_request_auth,
|
|
222
|
+
_content_type=_content_type,
|
|
223
|
+
_headers=_headers,
|
|
224
|
+
_host_index=_host_index
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
228
|
+
'204': None,
|
|
229
|
+
}
|
|
230
|
+
response_data = self.api_client.call_api(
|
|
231
|
+
*_param,
|
|
232
|
+
_request_timeout=_request_timeout
|
|
233
|
+
)
|
|
234
|
+
return response_data.response
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def _campaign_campaign_id_release_post_serialize(
|
|
238
|
+
self,
|
|
239
|
+
campaign_id,
|
|
240
|
+
_request_auth,
|
|
241
|
+
_content_type,
|
|
242
|
+
_headers,
|
|
243
|
+
_host_index,
|
|
244
|
+
) -> RequestSerialized:
|
|
245
|
+
|
|
246
|
+
_host = None
|
|
247
|
+
|
|
248
|
+
_collection_formats: Dict[str, str] = {
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
_path_params: Dict[str, str] = {}
|
|
252
|
+
_query_params: List[Tuple[str, str]] = []
|
|
253
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
254
|
+
_form_params: List[Tuple[str, str]] = []
|
|
255
|
+
_files: Dict[
|
|
256
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
257
|
+
] = {}
|
|
258
|
+
_body_params: Optional[bytes] = None
|
|
259
|
+
|
|
260
|
+
# process the path parameters
|
|
261
|
+
if campaign_id is not None:
|
|
262
|
+
_path_params['campaignId'] = campaign_id
|
|
263
|
+
# process the query parameters
|
|
264
|
+
# process the header parameters
|
|
265
|
+
# process the form parameters
|
|
266
|
+
# process the body parameter
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
# authentication setting
|
|
272
|
+
_auth_settings: List[str] = [
|
|
273
|
+
'bearer',
|
|
274
|
+
'oauth2'
|
|
275
|
+
]
|
|
276
|
+
|
|
277
|
+
return self.api_client.param_serialize(
|
|
278
|
+
method='POST',
|
|
279
|
+
resource_path='/campaign/{campaignId}/release',
|
|
280
|
+
path_params=_path_params,
|
|
281
|
+
query_params=_query_params,
|
|
282
|
+
header_params=_header_params,
|
|
283
|
+
body=_body_params,
|
|
284
|
+
post_params=_form_params,
|
|
285
|
+
files=_files,
|
|
286
|
+
auth_settings=_auth_settings,
|
|
287
|
+
collection_formats=_collection_formats,
|
|
288
|
+
_host=_host,
|
|
289
|
+
_request_auth=_request_auth
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
43
295
|
@validate_call
|
|
44
296
|
def campaign_monitor_get(
|
|
45
297
|
self,
|
|
@@ -2704,6 +2704,258 @@ class OrderApi:
|
|
|
2704
2704
|
|
|
2705
2705
|
|
|
2706
2706
|
|
|
2707
|
+
@validate_call
|
|
2708
|
+
def order_order_id_preview_post(
|
|
2709
|
+
self,
|
|
2710
|
+
order_id: StrictStr,
|
|
2711
|
+
_request_timeout: Union[
|
|
2712
|
+
None,
|
|
2713
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2714
|
+
Tuple[
|
|
2715
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2716
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2717
|
+
]
|
|
2718
|
+
] = None,
|
|
2719
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2720
|
+
_content_type: Optional[StrictStr] = None,
|
|
2721
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2722
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2723
|
+
) -> None:
|
|
2724
|
+
"""Puts the order into preview mode, where it one can inspect what our labelers receive.
|
|
2725
|
+
|
|
2726
|
+
|
|
2727
|
+
:param order_id: (required)
|
|
2728
|
+
:type order_id: str
|
|
2729
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2730
|
+
number provided, it will be total request
|
|
2731
|
+
timeout. It can also be a pair (tuple) of
|
|
2732
|
+
(connection, read) timeouts.
|
|
2733
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2734
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2735
|
+
request; this effectively ignores the
|
|
2736
|
+
authentication in the spec for a single request.
|
|
2737
|
+
:type _request_auth: dict, optional
|
|
2738
|
+
:param _content_type: force content-type for the request.
|
|
2739
|
+
:type _content_type: str, Optional
|
|
2740
|
+
:param _headers: set to override the headers for a single
|
|
2741
|
+
request; this effectively ignores the headers
|
|
2742
|
+
in the spec for a single request.
|
|
2743
|
+
:type _headers: dict, optional
|
|
2744
|
+
:param _host_index: set to override the host_index for a single
|
|
2745
|
+
request; this effectively ignores the host_index
|
|
2746
|
+
in the spec for a single request.
|
|
2747
|
+
:type _host_index: int, optional
|
|
2748
|
+
:return: Returns the result object.
|
|
2749
|
+
""" # noqa: E501
|
|
2750
|
+
|
|
2751
|
+
_param = self._order_order_id_preview_post_serialize(
|
|
2752
|
+
order_id=order_id,
|
|
2753
|
+
_request_auth=_request_auth,
|
|
2754
|
+
_content_type=_content_type,
|
|
2755
|
+
_headers=_headers,
|
|
2756
|
+
_host_index=_host_index
|
|
2757
|
+
)
|
|
2758
|
+
|
|
2759
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2760
|
+
'200': None,
|
|
2761
|
+
}
|
|
2762
|
+
response_data = self.api_client.call_api(
|
|
2763
|
+
*_param,
|
|
2764
|
+
_request_timeout=_request_timeout
|
|
2765
|
+
)
|
|
2766
|
+
response_data.read()
|
|
2767
|
+
return self.api_client.response_deserialize(
|
|
2768
|
+
response_data=response_data,
|
|
2769
|
+
response_types_map=_response_types_map,
|
|
2770
|
+
).data
|
|
2771
|
+
|
|
2772
|
+
|
|
2773
|
+
@validate_call
|
|
2774
|
+
def order_order_id_preview_post_with_http_info(
|
|
2775
|
+
self,
|
|
2776
|
+
order_id: StrictStr,
|
|
2777
|
+
_request_timeout: Union[
|
|
2778
|
+
None,
|
|
2779
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2780
|
+
Tuple[
|
|
2781
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2782
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2783
|
+
]
|
|
2784
|
+
] = None,
|
|
2785
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2786
|
+
_content_type: Optional[StrictStr] = None,
|
|
2787
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2788
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2789
|
+
) -> ApiResponse[None]:
|
|
2790
|
+
"""Puts the order into preview mode, where it one can inspect what our labelers receive.
|
|
2791
|
+
|
|
2792
|
+
|
|
2793
|
+
:param order_id: (required)
|
|
2794
|
+
:type order_id: str
|
|
2795
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2796
|
+
number provided, it will be total request
|
|
2797
|
+
timeout. It can also be a pair (tuple) of
|
|
2798
|
+
(connection, read) timeouts.
|
|
2799
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2800
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2801
|
+
request; this effectively ignores the
|
|
2802
|
+
authentication in the spec for a single request.
|
|
2803
|
+
:type _request_auth: dict, optional
|
|
2804
|
+
:param _content_type: force content-type for the request.
|
|
2805
|
+
:type _content_type: str, Optional
|
|
2806
|
+
:param _headers: set to override the headers for a single
|
|
2807
|
+
request; this effectively ignores the headers
|
|
2808
|
+
in the spec for a single request.
|
|
2809
|
+
:type _headers: dict, optional
|
|
2810
|
+
:param _host_index: set to override the host_index for a single
|
|
2811
|
+
request; this effectively ignores the host_index
|
|
2812
|
+
in the spec for a single request.
|
|
2813
|
+
:type _host_index: int, optional
|
|
2814
|
+
:return: Returns the result object.
|
|
2815
|
+
""" # noqa: E501
|
|
2816
|
+
|
|
2817
|
+
_param = self._order_order_id_preview_post_serialize(
|
|
2818
|
+
order_id=order_id,
|
|
2819
|
+
_request_auth=_request_auth,
|
|
2820
|
+
_content_type=_content_type,
|
|
2821
|
+
_headers=_headers,
|
|
2822
|
+
_host_index=_host_index
|
|
2823
|
+
)
|
|
2824
|
+
|
|
2825
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2826
|
+
'200': None,
|
|
2827
|
+
}
|
|
2828
|
+
response_data = self.api_client.call_api(
|
|
2829
|
+
*_param,
|
|
2830
|
+
_request_timeout=_request_timeout
|
|
2831
|
+
)
|
|
2832
|
+
response_data.read()
|
|
2833
|
+
return self.api_client.response_deserialize(
|
|
2834
|
+
response_data=response_data,
|
|
2835
|
+
response_types_map=_response_types_map,
|
|
2836
|
+
)
|
|
2837
|
+
|
|
2838
|
+
|
|
2839
|
+
@validate_call
|
|
2840
|
+
def order_order_id_preview_post_without_preload_content(
|
|
2841
|
+
self,
|
|
2842
|
+
order_id: StrictStr,
|
|
2843
|
+
_request_timeout: Union[
|
|
2844
|
+
None,
|
|
2845
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2846
|
+
Tuple[
|
|
2847
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2848
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2849
|
+
]
|
|
2850
|
+
] = None,
|
|
2851
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2852
|
+
_content_type: Optional[StrictStr] = None,
|
|
2853
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2854
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2855
|
+
) -> RESTResponseType:
|
|
2856
|
+
"""Puts the order into preview mode, where it one can inspect what our labelers receive.
|
|
2857
|
+
|
|
2858
|
+
|
|
2859
|
+
:param order_id: (required)
|
|
2860
|
+
:type order_id: str
|
|
2861
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2862
|
+
number provided, it will be total request
|
|
2863
|
+
timeout. It can also be a pair (tuple) of
|
|
2864
|
+
(connection, read) timeouts.
|
|
2865
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2866
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2867
|
+
request; this effectively ignores the
|
|
2868
|
+
authentication in the spec for a single request.
|
|
2869
|
+
:type _request_auth: dict, optional
|
|
2870
|
+
:param _content_type: force content-type for the request.
|
|
2871
|
+
:type _content_type: str, Optional
|
|
2872
|
+
:param _headers: set to override the headers for a single
|
|
2873
|
+
request; this effectively ignores the headers
|
|
2874
|
+
in the spec for a single request.
|
|
2875
|
+
:type _headers: dict, optional
|
|
2876
|
+
:param _host_index: set to override the host_index for a single
|
|
2877
|
+
request; this effectively ignores the host_index
|
|
2878
|
+
in the spec for a single request.
|
|
2879
|
+
:type _host_index: int, optional
|
|
2880
|
+
:return: Returns the result object.
|
|
2881
|
+
""" # noqa: E501
|
|
2882
|
+
|
|
2883
|
+
_param = self._order_order_id_preview_post_serialize(
|
|
2884
|
+
order_id=order_id,
|
|
2885
|
+
_request_auth=_request_auth,
|
|
2886
|
+
_content_type=_content_type,
|
|
2887
|
+
_headers=_headers,
|
|
2888
|
+
_host_index=_host_index
|
|
2889
|
+
)
|
|
2890
|
+
|
|
2891
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2892
|
+
'200': None,
|
|
2893
|
+
}
|
|
2894
|
+
response_data = self.api_client.call_api(
|
|
2895
|
+
*_param,
|
|
2896
|
+
_request_timeout=_request_timeout
|
|
2897
|
+
)
|
|
2898
|
+
return response_data.response
|
|
2899
|
+
|
|
2900
|
+
|
|
2901
|
+
def _order_order_id_preview_post_serialize(
|
|
2902
|
+
self,
|
|
2903
|
+
order_id,
|
|
2904
|
+
_request_auth,
|
|
2905
|
+
_content_type,
|
|
2906
|
+
_headers,
|
|
2907
|
+
_host_index,
|
|
2908
|
+
) -> RequestSerialized:
|
|
2909
|
+
|
|
2910
|
+
_host = None
|
|
2911
|
+
|
|
2912
|
+
_collection_formats: Dict[str, str] = {
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
_path_params: Dict[str, str] = {}
|
|
2916
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2917
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2918
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2919
|
+
_files: Dict[
|
|
2920
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2921
|
+
] = {}
|
|
2922
|
+
_body_params: Optional[bytes] = None
|
|
2923
|
+
|
|
2924
|
+
# process the path parameters
|
|
2925
|
+
if order_id is not None:
|
|
2926
|
+
_path_params['orderId'] = order_id
|
|
2927
|
+
# process the query parameters
|
|
2928
|
+
# process the header parameters
|
|
2929
|
+
# process the form parameters
|
|
2930
|
+
# process the body parameter
|
|
2931
|
+
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
# authentication setting
|
|
2936
|
+
_auth_settings: List[str] = [
|
|
2937
|
+
'bearer',
|
|
2938
|
+
'oauth2'
|
|
2939
|
+
]
|
|
2940
|
+
|
|
2941
|
+
return self.api_client.param_serialize(
|
|
2942
|
+
method='POST',
|
|
2943
|
+
resource_path='/order/{orderId}/preview',
|
|
2944
|
+
path_params=_path_params,
|
|
2945
|
+
query_params=_query_params,
|
|
2946
|
+
header_params=_header_params,
|
|
2947
|
+
body=_body_params,
|
|
2948
|
+
post_params=_form_params,
|
|
2949
|
+
files=_files,
|
|
2950
|
+
auth_settings=_auth_settings,
|
|
2951
|
+
collection_formats=_collection_formats,
|
|
2952
|
+
_host=_host,
|
|
2953
|
+
_request_auth=_request_auth
|
|
2954
|
+
)
|
|
2955
|
+
|
|
2956
|
+
|
|
2957
|
+
|
|
2958
|
+
|
|
2707
2959
|
@validate_call
|
|
2708
2960
|
def order_pause_post(
|
|
2709
2961
|
self,
|