mixpeek 0.17.3__py3-none-any.whl → 0.17.5__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.
- mixpeek/_version.py +3 -3
- mixpeek/assets.py +140 -28
- mixpeek/collections.py +100 -20
- mixpeek/feature_extractors.py +20 -4
- mixpeek/feature_search.py +20 -4
- mixpeek/features.py +80 -16
- mixpeek/health.py +12 -2
- mixpeek/ingest_assets.py +60 -12
- mixpeek/namespaces.py +120 -24
- mixpeek/organizations.py +160 -32
- mixpeek/tasks.py +40 -8
- mixpeek/taxonomy_entities.py +200 -40
- {mixpeek-0.17.3.dist-info → mixpeek-0.17.5.dist-info}/METADATA +10 -6
- {mixpeek-0.17.3.dist-info → mixpeek-0.17.5.dist-info}/RECORD +15 -15
- {mixpeek-0.17.3.dist-info → mixpeek-0.17.5.dist-info}/WHEEL +0 -0
mixpeek/_version.py
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
import importlib.metadata
|
4
4
|
|
5
5
|
__title__: str = "mixpeek"
|
6
|
-
__version__: str = "0.17.
|
6
|
+
__version__: str = "0.17.5"
|
7
7
|
__openapi_doc_version__: str = "0.81"
|
8
|
-
__gen_version__: str = "2.493.
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.17.
|
8
|
+
__gen_version__: str = "2.493.21"
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.17.5 2.493.21 0.81 mixpeek"
|
10
10
|
|
11
11
|
try:
|
12
12
|
if __package__ is not None:
|
mixpeek/assets.py
CHANGED
@@ -87,14 +87,22 @@ class Assets(BaseSDK):
|
|
87
87
|
if utils.match_response(http_res, "200", "application/json"):
|
88
88
|
return utils.unmarshal_json(http_res.text, models.AssetResponse)
|
89
89
|
if utils.match_response(
|
90
|
-
http_res, ["400", "401", "403", "404"
|
90
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
91
91
|
):
|
92
92
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
93
93
|
raise models.ErrorResponse(data=data)
|
94
94
|
if utils.match_response(http_res, "422", "application/json"):
|
95
95
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
96
96
|
raise models.HTTPValidationError(data=data)
|
97
|
-
if utils.match_response(http_res,
|
97
|
+
if utils.match_response(http_res, "500", "application/json"):
|
98
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
99
|
+
raise models.ErrorResponse(data=data)
|
100
|
+
if utils.match_response(http_res, "4XX", "*"):
|
101
|
+
http_res_text = utils.stream_to_text(http_res)
|
102
|
+
raise models.APIError(
|
103
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
104
|
+
)
|
105
|
+
if utils.match_response(http_res, "5XX", "*"):
|
98
106
|
http_res_text = utils.stream_to_text(http_res)
|
99
107
|
raise models.APIError(
|
100
108
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -187,14 +195,22 @@ class Assets(BaseSDK):
|
|
187
195
|
if utils.match_response(http_res, "200", "application/json"):
|
188
196
|
return utils.unmarshal_json(http_res.text, models.AssetResponse)
|
189
197
|
if utils.match_response(
|
190
|
-
http_res, ["400", "401", "403", "404"
|
198
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
191
199
|
):
|
192
200
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
193
201
|
raise models.ErrorResponse(data=data)
|
194
202
|
if utils.match_response(http_res, "422", "application/json"):
|
195
203
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
196
204
|
raise models.HTTPValidationError(data=data)
|
197
|
-
if utils.match_response(http_res,
|
205
|
+
if utils.match_response(http_res, "500", "application/json"):
|
206
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
207
|
+
raise models.ErrorResponse(data=data)
|
208
|
+
if utils.match_response(http_res, "4XX", "*"):
|
209
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
210
|
+
raise models.APIError(
|
211
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
212
|
+
)
|
213
|
+
if utils.match_response(http_res, "5XX", "*"):
|
198
214
|
http_res_text = await utils.stream_to_text_async(http_res)
|
199
215
|
raise models.APIError(
|
200
216
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -285,14 +301,22 @@ class Assets(BaseSDK):
|
|
285
301
|
if utils.match_response(http_res, "200", "application/json"):
|
286
302
|
return utils.unmarshal_json(http_res.text, Any)
|
287
303
|
if utils.match_response(
|
288
|
-
http_res, ["400", "401", "403", "404"
|
304
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
289
305
|
):
|
290
306
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
291
307
|
raise models.ErrorResponse(data=data)
|
292
308
|
if utils.match_response(http_res, "422", "application/json"):
|
293
309
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
294
310
|
raise models.HTTPValidationError(data=data)
|
295
|
-
if utils.match_response(http_res,
|
311
|
+
if utils.match_response(http_res, "500", "application/json"):
|
312
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
313
|
+
raise models.ErrorResponse(data=data)
|
314
|
+
if utils.match_response(http_res, "4XX", "*"):
|
315
|
+
http_res_text = utils.stream_to_text(http_res)
|
316
|
+
raise models.APIError(
|
317
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
318
|
+
)
|
319
|
+
if utils.match_response(http_res, "5XX", "*"):
|
296
320
|
http_res_text = utils.stream_to_text(http_res)
|
297
321
|
raise models.APIError(
|
298
322
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -383,14 +407,22 @@ class Assets(BaseSDK):
|
|
383
407
|
if utils.match_response(http_res, "200", "application/json"):
|
384
408
|
return utils.unmarshal_json(http_res.text, Any)
|
385
409
|
if utils.match_response(
|
386
|
-
http_res, ["400", "401", "403", "404"
|
410
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
387
411
|
):
|
388
412
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
389
413
|
raise models.ErrorResponse(data=data)
|
390
414
|
if utils.match_response(http_res, "422", "application/json"):
|
391
415
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
392
416
|
raise models.HTTPValidationError(data=data)
|
393
|
-
if utils.match_response(http_res,
|
417
|
+
if utils.match_response(http_res, "500", "application/json"):
|
418
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
419
|
+
raise models.ErrorResponse(data=data)
|
420
|
+
if utils.match_response(http_res, "4XX", "*"):
|
421
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
422
|
+
raise models.APIError(
|
423
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
424
|
+
)
|
425
|
+
if utils.match_response(http_res, "5XX", "*"):
|
394
426
|
http_res_text = await utils.stream_to_text_async(http_res)
|
395
427
|
raise models.APIError(
|
396
428
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -503,14 +535,22 @@ class Assets(BaseSDK):
|
|
503
535
|
if utils.match_response(http_res, "200", "application/json"):
|
504
536
|
return utils.unmarshal_json(http_res.text, models.AssetResponse)
|
505
537
|
if utils.match_response(
|
506
|
-
http_res, ["400", "401", "403", "404"
|
538
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
507
539
|
):
|
508
540
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
509
541
|
raise models.ErrorResponse(data=data)
|
510
542
|
if utils.match_response(http_res, "422", "application/json"):
|
511
543
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
512
544
|
raise models.HTTPValidationError(data=data)
|
513
|
-
if utils.match_response(http_res,
|
545
|
+
if utils.match_response(http_res, "500", "application/json"):
|
546
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
547
|
+
raise models.ErrorResponse(data=data)
|
548
|
+
if utils.match_response(http_res, "4XX", "*"):
|
549
|
+
http_res_text = utils.stream_to_text(http_res)
|
550
|
+
raise models.APIError(
|
551
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
552
|
+
)
|
553
|
+
if utils.match_response(http_res, "5XX", "*"):
|
514
554
|
http_res_text = utils.stream_to_text(http_res)
|
515
555
|
raise models.APIError(
|
516
556
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -623,14 +663,22 @@ class Assets(BaseSDK):
|
|
623
663
|
if utils.match_response(http_res, "200", "application/json"):
|
624
664
|
return utils.unmarshal_json(http_res.text, models.AssetResponse)
|
625
665
|
if utils.match_response(
|
626
|
-
http_res, ["400", "401", "403", "404"
|
666
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
627
667
|
):
|
628
668
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
629
669
|
raise models.ErrorResponse(data=data)
|
630
670
|
if utils.match_response(http_res, "422", "application/json"):
|
631
671
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
632
672
|
raise models.HTTPValidationError(data=data)
|
633
|
-
if utils.match_response(http_res,
|
673
|
+
if utils.match_response(http_res, "500", "application/json"):
|
674
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
675
|
+
raise models.ErrorResponse(data=data)
|
676
|
+
if utils.match_response(http_res, "4XX", "*"):
|
677
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
678
|
+
raise models.APIError(
|
679
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
680
|
+
)
|
681
|
+
if utils.match_response(http_res, "5XX", "*"):
|
634
682
|
http_res_text = await utils.stream_to_text_async(http_res)
|
635
683
|
raise models.APIError(
|
636
684
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -743,14 +791,22 @@ class Assets(BaseSDK):
|
|
743
791
|
if utils.match_response(http_res, "200", "application/json"):
|
744
792
|
return utils.unmarshal_json(http_res.text, models.AssetResponse)
|
745
793
|
if utils.match_response(
|
746
|
-
http_res, ["400", "401", "403", "404"
|
794
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
747
795
|
):
|
748
796
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
749
797
|
raise models.ErrorResponse(data=data)
|
750
798
|
if utils.match_response(http_res, "422", "application/json"):
|
751
799
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
752
800
|
raise models.HTTPValidationError(data=data)
|
753
|
-
if utils.match_response(http_res,
|
801
|
+
if utils.match_response(http_res, "500", "application/json"):
|
802
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
803
|
+
raise models.ErrorResponse(data=data)
|
804
|
+
if utils.match_response(http_res, "4XX", "*"):
|
805
|
+
http_res_text = utils.stream_to_text(http_res)
|
806
|
+
raise models.APIError(
|
807
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
808
|
+
)
|
809
|
+
if utils.match_response(http_res, "5XX", "*"):
|
754
810
|
http_res_text = utils.stream_to_text(http_res)
|
755
811
|
raise models.APIError(
|
756
812
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -863,14 +919,22 @@ class Assets(BaseSDK):
|
|
863
919
|
if utils.match_response(http_res, "200", "application/json"):
|
864
920
|
return utils.unmarshal_json(http_res.text, models.AssetResponse)
|
865
921
|
if utils.match_response(
|
866
|
-
http_res, ["400", "401", "403", "404"
|
922
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
867
923
|
):
|
868
924
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
869
925
|
raise models.ErrorResponse(data=data)
|
870
926
|
if utils.match_response(http_res, "422", "application/json"):
|
871
927
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
872
928
|
raise models.HTTPValidationError(data=data)
|
873
|
-
if utils.match_response(http_res,
|
929
|
+
if utils.match_response(http_res, "500", "application/json"):
|
930
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
931
|
+
raise models.ErrorResponse(data=data)
|
932
|
+
if utils.match_response(http_res, "4XX", "*"):
|
933
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
934
|
+
raise models.APIError(
|
935
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
936
|
+
)
|
937
|
+
if utils.match_response(http_res, "5XX", "*"):
|
874
938
|
http_res_text = await utils.stream_to_text_async(http_res)
|
875
939
|
raise models.APIError(
|
876
940
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -963,14 +1027,22 @@ class Assets(BaseSDK):
|
|
963
1027
|
if utils.match_response(http_res, "200", "application/json"):
|
964
1028
|
return utils.unmarshal_json(http_res.text, models.GroupedAssetData)
|
965
1029
|
if utils.match_response(
|
966
|
-
http_res, ["400", "401", "403", "404"
|
1030
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
967
1031
|
):
|
968
1032
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
969
1033
|
raise models.ErrorResponse(data=data)
|
970
1034
|
if utils.match_response(http_res, "422", "application/json"):
|
971
1035
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
972
1036
|
raise models.HTTPValidationError(data=data)
|
973
|
-
if utils.match_response(http_res,
|
1037
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1038
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1039
|
+
raise models.ErrorResponse(data=data)
|
1040
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1041
|
+
http_res_text = utils.stream_to_text(http_res)
|
1042
|
+
raise models.APIError(
|
1043
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1044
|
+
)
|
1045
|
+
if utils.match_response(http_res, "5XX", "*"):
|
974
1046
|
http_res_text = utils.stream_to_text(http_res)
|
975
1047
|
raise models.APIError(
|
976
1048
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1063,14 +1135,22 @@ class Assets(BaseSDK):
|
|
1063
1135
|
if utils.match_response(http_res, "200", "application/json"):
|
1064
1136
|
return utils.unmarshal_json(http_res.text, models.GroupedAssetData)
|
1065
1137
|
if utils.match_response(
|
1066
|
-
http_res, ["400", "401", "403", "404"
|
1138
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1067
1139
|
):
|
1068
1140
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1069
1141
|
raise models.ErrorResponse(data=data)
|
1070
1142
|
if utils.match_response(http_res, "422", "application/json"):
|
1071
1143
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1072
1144
|
raise models.HTTPValidationError(data=data)
|
1073
|
-
if utils.match_response(http_res,
|
1145
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1146
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1147
|
+
raise models.ErrorResponse(data=data)
|
1148
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1149
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1150
|
+
raise models.APIError(
|
1151
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1152
|
+
)
|
1153
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1074
1154
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1075
1155
|
raise models.APIError(
|
1076
1156
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1200,14 +1280,22 @@ class Assets(BaseSDK):
|
|
1200
1280
|
if utils.match_response(http_res, "200", "application/json"):
|
1201
1281
|
return utils.unmarshal_json(http_res.text, models.ListAssetsResponse)
|
1202
1282
|
if utils.match_response(
|
1203
|
-
http_res, ["400", "401", "403", "404"
|
1283
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1204
1284
|
):
|
1205
1285
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1206
1286
|
raise models.ErrorResponse(data=data)
|
1207
1287
|
if utils.match_response(http_res, "422", "application/json"):
|
1208
1288
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1209
1289
|
raise models.HTTPValidationError(data=data)
|
1210
|
-
if utils.match_response(http_res,
|
1290
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1291
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1292
|
+
raise models.ErrorResponse(data=data)
|
1293
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1294
|
+
http_res_text = utils.stream_to_text(http_res)
|
1295
|
+
raise models.APIError(
|
1296
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1297
|
+
)
|
1298
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1211
1299
|
http_res_text = utils.stream_to_text(http_res)
|
1212
1300
|
raise models.APIError(
|
1213
1301
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1337,14 +1425,22 @@ class Assets(BaseSDK):
|
|
1337
1425
|
if utils.match_response(http_res, "200", "application/json"):
|
1338
1426
|
return utils.unmarshal_json(http_res.text, models.ListAssetsResponse)
|
1339
1427
|
if utils.match_response(
|
1340
|
-
http_res, ["400", "401", "403", "404"
|
1428
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1341
1429
|
):
|
1342
1430
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1343
1431
|
raise models.ErrorResponse(data=data)
|
1344
1432
|
if utils.match_response(http_res, "422", "application/json"):
|
1345
1433
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1346
1434
|
raise models.HTTPValidationError(data=data)
|
1347
|
-
if utils.match_response(http_res,
|
1435
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1436
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1437
|
+
raise models.ErrorResponse(data=data)
|
1438
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1439
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1440
|
+
raise models.APIError(
|
1441
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1442
|
+
)
|
1443
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1348
1444
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1349
1445
|
raise models.APIError(
|
1350
1446
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1468,14 +1564,22 @@ class Assets(BaseSDK):
|
|
1468
1564
|
if utils.match_response(http_res, "200", "application/json"):
|
1469
1565
|
return utils.unmarshal_json(http_res.text, models.ListAssetsResponse)
|
1470
1566
|
if utils.match_response(
|
1471
|
-
http_res, ["400", "401", "403", "404"
|
1567
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1472
1568
|
):
|
1473
1569
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1474
1570
|
raise models.ErrorResponse(data=data)
|
1475
1571
|
if utils.match_response(http_res, "422", "application/json"):
|
1476
1572
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1477
1573
|
raise models.HTTPValidationError(data=data)
|
1478
|
-
if utils.match_response(http_res,
|
1574
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1575
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1576
|
+
raise models.ErrorResponse(data=data)
|
1577
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1578
|
+
http_res_text = utils.stream_to_text(http_res)
|
1579
|
+
raise models.APIError(
|
1580
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1581
|
+
)
|
1582
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1479
1583
|
http_res_text = utils.stream_to_text(http_res)
|
1480
1584
|
raise models.APIError(
|
1481
1585
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1599,14 +1703,22 @@ class Assets(BaseSDK):
|
|
1599
1703
|
if utils.match_response(http_res, "200", "application/json"):
|
1600
1704
|
return utils.unmarshal_json(http_res.text, models.ListAssetsResponse)
|
1601
1705
|
if utils.match_response(
|
1602
|
-
http_res, ["400", "401", "403", "404"
|
1706
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1603
1707
|
):
|
1604
1708
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1605
1709
|
raise models.ErrorResponse(data=data)
|
1606
1710
|
if utils.match_response(http_res, "422", "application/json"):
|
1607
1711
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1608
1712
|
raise models.HTTPValidationError(data=data)
|
1609
|
-
if utils.match_response(http_res,
|
1713
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1714
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1715
|
+
raise models.ErrorResponse(data=data)
|
1716
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1717
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1718
|
+
raise models.APIError(
|
1719
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1720
|
+
)
|
1721
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1610
1722
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1611
1723
|
raise models.APIError(
|
1612
1724
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
mixpeek/collections.py
CHANGED
@@ -85,14 +85,22 @@ class Collections(BaseSDK):
|
|
85
85
|
if utils.match_response(http_res, "200", "application/json"):
|
86
86
|
return utils.unmarshal_json(http_res.text, models.ListCollectionsResponse)
|
87
87
|
if utils.match_response(
|
88
|
-
http_res, ["400", "401", "403", "404"
|
88
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
89
89
|
):
|
90
90
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
91
91
|
raise models.ErrorResponse(data=data)
|
92
92
|
if utils.match_response(http_res, "422", "application/json"):
|
93
93
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
94
94
|
raise models.HTTPValidationError(data=data)
|
95
|
-
if utils.match_response(http_res,
|
95
|
+
if utils.match_response(http_res, "500", "application/json"):
|
96
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
97
|
+
raise models.ErrorResponse(data=data)
|
98
|
+
if utils.match_response(http_res, "4XX", "*"):
|
99
|
+
http_res_text = utils.stream_to_text(http_res)
|
100
|
+
raise models.APIError(
|
101
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
102
|
+
)
|
103
|
+
if utils.match_response(http_res, "5XX", "*"):
|
96
104
|
http_res_text = utils.stream_to_text(http_res)
|
97
105
|
raise models.APIError(
|
98
106
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -183,14 +191,22 @@ class Collections(BaseSDK):
|
|
183
191
|
if utils.match_response(http_res, "200", "application/json"):
|
184
192
|
return utils.unmarshal_json(http_res.text, models.ListCollectionsResponse)
|
185
193
|
if utils.match_response(
|
186
|
-
http_res, ["400", "401", "403", "404"
|
194
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
187
195
|
):
|
188
196
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
189
197
|
raise models.ErrorResponse(data=data)
|
190
198
|
if utils.match_response(http_res, "422", "application/json"):
|
191
199
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
192
200
|
raise models.HTTPValidationError(data=data)
|
193
|
-
if utils.match_response(http_res,
|
201
|
+
if utils.match_response(http_res, "500", "application/json"):
|
202
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
203
|
+
raise models.ErrorResponse(data=data)
|
204
|
+
if utils.match_response(http_res, "4XX", "*"):
|
205
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
206
|
+
raise models.APIError(
|
207
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
208
|
+
)
|
209
|
+
if utils.match_response(http_res, "5XX", "*"):
|
194
210
|
http_res_text = await utils.stream_to_text_async(http_res)
|
195
211
|
raise models.APIError(
|
196
212
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -300,14 +316,22 @@ class Collections(BaseSDK):
|
|
300
316
|
if utils.match_response(http_res, "200", "application/json"):
|
301
317
|
return utils.unmarshal_json(http_res.text, models.CollectionModel)
|
302
318
|
if utils.match_response(
|
303
|
-
http_res, ["400", "401", "403", "404"
|
319
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
304
320
|
):
|
305
321
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
306
322
|
raise models.ErrorResponse(data=data)
|
307
323
|
if utils.match_response(http_res, "422", "application/json"):
|
308
324
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
309
325
|
raise models.HTTPValidationError(data=data)
|
310
|
-
if utils.match_response(http_res,
|
326
|
+
if utils.match_response(http_res, "500", "application/json"):
|
327
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
328
|
+
raise models.ErrorResponse(data=data)
|
329
|
+
if utils.match_response(http_res, "4XX", "*"):
|
330
|
+
http_res_text = utils.stream_to_text(http_res)
|
331
|
+
raise models.APIError(
|
332
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
333
|
+
)
|
334
|
+
if utils.match_response(http_res, "5XX", "*"):
|
311
335
|
http_res_text = utils.stream_to_text(http_res)
|
312
336
|
raise models.APIError(
|
313
337
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -417,14 +441,22 @@ class Collections(BaseSDK):
|
|
417
441
|
if utils.match_response(http_res, "200", "application/json"):
|
418
442
|
return utils.unmarshal_json(http_res.text, models.CollectionModel)
|
419
443
|
if utils.match_response(
|
420
|
-
http_res, ["400", "401", "403", "404"
|
444
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
421
445
|
):
|
422
446
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
423
447
|
raise models.ErrorResponse(data=data)
|
424
448
|
if utils.match_response(http_res, "422", "application/json"):
|
425
449
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
426
450
|
raise models.HTTPValidationError(data=data)
|
427
|
-
if utils.match_response(http_res,
|
451
|
+
if utils.match_response(http_res, "500", "application/json"):
|
452
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
453
|
+
raise models.ErrorResponse(data=data)
|
454
|
+
if utils.match_response(http_res, "4XX", "*"):
|
455
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
456
|
+
raise models.APIError(
|
457
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
458
|
+
)
|
459
|
+
if utils.match_response(http_res, "5XX", "*"):
|
428
460
|
http_res_text = await utils.stream_to_text_async(http_res)
|
429
461
|
raise models.APIError(
|
430
462
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -514,14 +546,22 @@ class Collections(BaseSDK):
|
|
514
546
|
if utils.match_response(http_res, "200", "application/json"):
|
515
547
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
516
548
|
if utils.match_response(
|
517
|
-
http_res, ["400", "401", "403", "404"
|
549
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
518
550
|
):
|
519
551
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
520
552
|
raise models.ErrorResponse(data=data)
|
521
553
|
if utils.match_response(http_res, "422", "application/json"):
|
522
554
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
523
555
|
raise models.HTTPValidationError(data=data)
|
524
|
-
if utils.match_response(http_res,
|
556
|
+
if utils.match_response(http_res, "500", "application/json"):
|
557
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
558
|
+
raise models.ErrorResponse(data=data)
|
559
|
+
if utils.match_response(http_res, "4XX", "*"):
|
560
|
+
http_res_text = utils.stream_to_text(http_res)
|
561
|
+
raise models.APIError(
|
562
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
563
|
+
)
|
564
|
+
if utils.match_response(http_res, "5XX", "*"):
|
525
565
|
http_res_text = utils.stream_to_text(http_res)
|
526
566
|
raise models.APIError(
|
527
567
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -611,14 +651,22 @@ class Collections(BaseSDK):
|
|
611
651
|
if utils.match_response(http_res, "200", "application/json"):
|
612
652
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
613
653
|
if utils.match_response(
|
614
|
-
http_res, ["400", "401", "403", "404"
|
654
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
615
655
|
):
|
616
656
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
617
657
|
raise models.ErrorResponse(data=data)
|
618
658
|
if utils.match_response(http_res, "422", "application/json"):
|
619
659
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
620
660
|
raise models.HTTPValidationError(data=data)
|
621
|
-
if utils.match_response(http_res,
|
661
|
+
if utils.match_response(http_res, "500", "application/json"):
|
662
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
663
|
+
raise models.ErrorResponse(data=data)
|
664
|
+
if utils.match_response(http_res, "4XX", "*"):
|
665
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
666
|
+
raise models.APIError(
|
667
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
668
|
+
)
|
669
|
+
if utils.match_response(http_res, "5XX", "*"):
|
622
670
|
http_res_text = await utils.stream_to_text_async(http_res)
|
623
671
|
raise models.APIError(
|
624
672
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -730,14 +778,22 @@ class Collections(BaseSDK):
|
|
730
778
|
if utils.match_response(http_res, "200", "application/json"):
|
731
779
|
return utils.unmarshal_json(http_res.text, models.CollectionModel)
|
732
780
|
if utils.match_response(
|
733
|
-
http_res, ["400", "401", "403", "404"
|
781
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
734
782
|
):
|
735
783
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
736
784
|
raise models.ErrorResponse(data=data)
|
737
785
|
if utils.match_response(http_res, "422", "application/json"):
|
738
786
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
739
787
|
raise models.HTTPValidationError(data=data)
|
740
|
-
if utils.match_response(http_res,
|
788
|
+
if utils.match_response(http_res, "500", "application/json"):
|
789
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
790
|
+
raise models.ErrorResponse(data=data)
|
791
|
+
if utils.match_response(http_res, "4XX", "*"):
|
792
|
+
http_res_text = utils.stream_to_text(http_res)
|
793
|
+
raise models.APIError(
|
794
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
795
|
+
)
|
796
|
+
if utils.match_response(http_res, "5XX", "*"):
|
741
797
|
http_res_text = utils.stream_to_text(http_res)
|
742
798
|
raise models.APIError(
|
743
799
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -849,14 +905,22 @@ class Collections(BaseSDK):
|
|
849
905
|
if utils.match_response(http_res, "200", "application/json"):
|
850
906
|
return utils.unmarshal_json(http_res.text, models.CollectionModel)
|
851
907
|
if utils.match_response(
|
852
|
-
http_res, ["400", "401", "403", "404"
|
908
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
853
909
|
):
|
854
910
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
855
911
|
raise models.ErrorResponse(data=data)
|
856
912
|
if utils.match_response(http_res, "422", "application/json"):
|
857
913
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
858
914
|
raise models.HTTPValidationError(data=data)
|
859
|
-
if utils.match_response(http_res,
|
915
|
+
if utils.match_response(http_res, "500", "application/json"):
|
916
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
917
|
+
raise models.ErrorResponse(data=data)
|
918
|
+
if utils.match_response(http_res, "4XX", "*"):
|
919
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
920
|
+
raise models.APIError(
|
921
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
922
|
+
)
|
923
|
+
if utils.match_response(http_res, "5XX", "*"):
|
860
924
|
http_res_text = await utils.stream_to_text_async(http_res)
|
861
925
|
raise models.APIError(
|
862
926
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -946,14 +1010,22 @@ class Collections(BaseSDK):
|
|
946
1010
|
if utils.match_response(http_res, "200", "application/json"):
|
947
1011
|
return utils.unmarshal_json(http_res.text, models.CollectionModel)
|
948
1012
|
if utils.match_response(
|
949
|
-
http_res, ["400", "401", "403", "404"
|
1013
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
950
1014
|
):
|
951
1015
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
952
1016
|
raise models.ErrorResponse(data=data)
|
953
1017
|
if utils.match_response(http_res, "422", "application/json"):
|
954
1018
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
955
1019
|
raise models.HTTPValidationError(data=data)
|
956
|
-
if utils.match_response(http_res,
|
1020
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1021
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1022
|
+
raise models.ErrorResponse(data=data)
|
1023
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1024
|
+
http_res_text = utils.stream_to_text(http_res)
|
1025
|
+
raise models.APIError(
|
1026
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1027
|
+
)
|
1028
|
+
if utils.match_response(http_res, "5XX", "*"):
|
957
1029
|
http_res_text = utils.stream_to_text(http_res)
|
958
1030
|
raise models.APIError(
|
959
1031
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1043,14 +1115,22 @@ class Collections(BaseSDK):
|
|
1043
1115
|
if utils.match_response(http_res, "200", "application/json"):
|
1044
1116
|
return utils.unmarshal_json(http_res.text, models.CollectionModel)
|
1045
1117
|
if utils.match_response(
|
1046
|
-
http_res, ["400", "401", "403", "404"
|
1118
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1047
1119
|
):
|
1048
1120
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1049
1121
|
raise models.ErrorResponse(data=data)
|
1050
1122
|
if utils.match_response(http_res, "422", "application/json"):
|
1051
1123
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1052
1124
|
raise models.HTTPValidationError(data=data)
|
1053
|
-
if utils.match_response(http_res,
|
1125
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1126
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1127
|
+
raise models.ErrorResponse(data=data)
|
1128
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1129
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1130
|
+
raise models.APIError(
|
1131
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1132
|
+
)
|
1133
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1054
1134
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1055
1135
|
raise models.APIError(
|
1056
1136
|
"API error occurred", http_res.status_code, http_res_text, http_res
|