mixpeek 0.17.3__py3-none-any.whl → 0.17.4__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.4.dist-info}/METADATA +10 -6
- {mixpeek-0.17.3.dist-info → mixpeek-0.17.4.dist-info}/RECORD +15 -15
- {mixpeek-0.17.3.dist-info → mixpeek-0.17.4.dist-info}/WHEEL +0 -0
mixpeek/organizations.py
CHANGED
@@ -76,14 +76,22 @@ class Organizations(BaseSDK):
|
|
76
76
|
if utils.match_response(http_res, "200", "application/json"):
|
77
77
|
return utils.unmarshal_json(http_res.text, models.OrganizationModel)
|
78
78
|
if utils.match_response(
|
79
|
-
http_res, ["400", "401", "403", "404"
|
79
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
80
80
|
):
|
81
81
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
82
82
|
raise models.ErrorResponse(data=data)
|
83
83
|
if utils.match_response(http_res, "422", "application/json"):
|
84
84
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
85
85
|
raise models.HTTPValidationError(data=data)
|
86
|
-
if utils.match_response(http_res,
|
86
|
+
if utils.match_response(http_res, "500", "application/json"):
|
87
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
88
|
+
raise models.ErrorResponse(data=data)
|
89
|
+
if utils.match_response(http_res, "4XX", "*"):
|
90
|
+
http_res_text = utils.stream_to_text(http_res)
|
91
|
+
raise models.APIError(
|
92
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
93
|
+
)
|
94
|
+
if utils.match_response(http_res, "5XX", "*"):
|
87
95
|
http_res_text = utils.stream_to_text(http_res)
|
88
96
|
raise models.APIError(
|
89
97
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -164,14 +172,22 @@ class Organizations(BaseSDK):
|
|
164
172
|
if utils.match_response(http_res, "200", "application/json"):
|
165
173
|
return utils.unmarshal_json(http_res.text, models.OrganizationModel)
|
166
174
|
if utils.match_response(
|
167
|
-
http_res, ["400", "401", "403", "404"
|
175
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
168
176
|
):
|
169
177
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
170
178
|
raise models.ErrorResponse(data=data)
|
171
179
|
if utils.match_response(http_res, "422", "application/json"):
|
172
180
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
173
181
|
raise models.HTTPValidationError(data=data)
|
174
|
-
if utils.match_response(http_res,
|
182
|
+
if utils.match_response(http_res, "500", "application/json"):
|
183
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
184
|
+
raise models.ErrorResponse(data=data)
|
185
|
+
if utils.match_response(http_res, "4XX", "*"):
|
186
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
187
|
+
raise models.APIError(
|
188
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
189
|
+
)
|
190
|
+
if utils.match_response(http_res, "5XX", "*"):
|
175
191
|
http_res_text = await utils.stream_to_text_async(http_res)
|
176
192
|
raise models.APIError(
|
177
193
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -252,14 +268,22 @@ class Organizations(BaseSDK):
|
|
252
268
|
if utils.match_response(http_res, "200", "application/json"):
|
253
269
|
return utils.unmarshal_json(http_res.text, models.Usage)
|
254
270
|
if utils.match_response(
|
255
|
-
http_res, ["400", "401", "403", "404"
|
271
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
256
272
|
):
|
257
273
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
258
274
|
raise models.ErrorResponse(data=data)
|
259
275
|
if utils.match_response(http_res, "422", "application/json"):
|
260
276
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
261
277
|
raise models.HTTPValidationError(data=data)
|
262
|
-
if utils.match_response(http_res,
|
278
|
+
if utils.match_response(http_res, "500", "application/json"):
|
279
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
280
|
+
raise models.ErrorResponse(data=data)
|
281
|
+
if utils.match_response(http_res, "4XX", "*"):
|
282
|
+
http_res_text = utils.stream_to_text(http_res)
|
283
|
+
raise models.APIError(
|
284
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
285
|
+
)
|
286
|
+
if utils.match_response(http_res, "5XX", "*"):
|
263
287
|
http_res_text = utils.stream_to_text(http_res)
|
264
288
|
raise models.APIError(
|
265
289
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -340,14 +364,22 @@ class Organizations(BaseSDK):
|
|
340
364
|
if utils.match_response(http_res, "200", "application/json"):
|
341
365
|
return utils.unmarshal_json(http_res.text, models.Usage)
|
342
366
|
if utils.match_response(
|
343
|
-
http_res, ["400", "401", "403", "404"
|
367
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
344
368
|
):
|
345
369
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
346
370
|
raise models.ErrorResponse(data=data)
|
347
371
|
if utils.match_response(http_res, "422", "application/json"):
|
348
372
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
349
373
|
raise models.HTTPValidationError(data=data)
|
350
|
-
if utils.match_response(http_res,
|
374
|
+
if utils.match_response(http_res, "500", "application/json"):
|
375
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
376
|
+
raise models.ErrorResponse(data=data)
|
377
|
+
if utils.match_response(http_res, "4XX", "*"):
|
378
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
379
|
+
raise models.APIError(
|
380
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
381
|
+
)
|
382
|
+
if utils.match_response(http_res, "5XX", "*"):
|
351
383
|
http_res_text = await utils.stream_to_text_async(http_res)
|
352
384
|
raise models.APIError(
|
353
385
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -432,14 +464,22 @@ class Organizations(BaseSDK):
|
|
432
464
|
if utils.match_response(http_res, "200", "application/json"):
|
433
465
|
return utils.unmarshal_json(http_res.text, models.UserModelOutput)
|
434
466
|
if utils.match_response(
|
435
|
-
http_res, ["400", "401", "403", "404"
|
467
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
436
468
|
):
|
437
469
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
438
470
|
raise models.ErrorResponse(data=data)
|
439
471
|
if utils.match_response(http_res, "422", "application/json"):
|
440
472
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
441
473
|
raise models.HTTPValidationError(data=data)
|
442
|
-
if utils.match_response(http_res,
|
474
|
+
if utils.match_response(http_res, "500", "application/json"):
|
475
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
476
|
+
raise models.ErrorResponse(data=data)
|
477
|
+
if utils.match_response(http_res, "4XX", "*"):
|
478
|
+
http_res_text = utils.stream_to_text(http_res)
|
479
|
+
raise models.APIError(
|
480
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
481
|
+
)
|
482
|
+
if utils.match_response(http_res, "5XX", "*"):
|
443
483
|
http_res_text = utils.stream_to_text(http_res)
|
444
484
|
raise models.APIError(
|
445
485
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -524,14 +564,22 @@ class Organizations(BaseSDK):
|
|
524
564
|
if utils.match_response(http_res, "200", "application/json"):
|
525
565
|
return utils.unmarshal_json(http_res.text, models.UserModelOutput)
|
526
566
|
if utils.match_response(
|
527
|
-
http_res, ["400", "401", "403", "404"
|
567
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
528
568
|
):
|
529
569
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
530
570
|
raise models.ErrorResponse(data=data)
|
531
571
|
if utils.match_response(http_res, "422", "application/json"):
|
532
572
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
533
573
|
raise models.HTTPValidationError(data=data)
|
534
|
-
if utils.match_response(http_res,
|
574
|
+
if utils.match_response(http_res, "500", "application/json"):
|
575
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
576
|
+
raise models.ErrorResponse(data=data)
|
577
|
+
if utils.match_response(http_res, "4XX", "*"):
|
578
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
579
|
+
raise models.APIError(
|
580
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
581
|
+
)
|
582
|
+
if utils.match_response(http_res, "5XX", "*"):
|
535
583
|
http_res_text = await utils.stream_to_text_async(http_res)
|
536
584
|
raise models.APIError(
|
537
585
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -619,14 +667,22 @@ class Organizations(BaseSDK):
|
|
619
667
|
if utils.match_response(http_res, "200", "application/json"):
|
620
668
|
return utils.unmarshal_json(http_res.text, Any)
|
621
669
|
if utils.match_response(
|
622
|
-
http_res, ["400", "401", "403", "404"
|
670
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
623
671
|
):
|
624
672
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
625
673
|
raise models.ErrorResponse(data=data)
|
626
674
|
if utils.match_response(http_res, "422", "application/json"):
|
627
675
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
628
676
|
raise models.HTTPValidationError(data=data)
|
629
|
-
if utils.match_response(http_res,
|
677
|
+
if utils.match_response(http_res, "500", "application/json"):
|
678
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
679
|
+
raise models.ErrorResponse(data=data)
|
680
|
+
if utils.match_response(http_res, "4XX", "*"):
|
681
|
+
http_res_text = utils.stream_to_text(http_res)
|
682
|
+
raise models.APIError(
|
683
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
684
|
+
)
|
685
|
+
if utils.match_response(http_res, "5XX", "*"):
|
630
686
|
http_res_text = utils.stream_to_text(http_res)
|
631
687
|
raise models.APIError(
|
632
688
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -714,14 +770,22 @@ class Organizations(BaseSDK):
|
|
714
770
|
if utils.match_response(http_res, "200", "application/json"):
|
715
771
|
return utils.unmarshal_json(http_res.text, Any)
|
716
772
|
if utils.match_response(
|
717
|
-
http_res, ["400", "401", "403", "404"
|
773
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
718
774
|
):
|
719
775
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
720
776
|
raise models.ErrorResponse(data=data)
|
721
777
|
if utils.match_response(http_res, "422", "application/json"):
|
722
778
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
723
779
|
raise models.HTTPValidationError(data=data)
|
724
|
-
if utils.match_response(http_res,
|
780
|
+
if utils.match_response(http_res, "500", "application/json"):
|
781
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
782
|
+
raise models.ErrorResponse(data=data)
|
783
|
+
if utils.match_response(http_res, "4XX", "*"):
|
784
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
785
|
+
raise models.APIError(
|
786
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
787
|
+
)
|
788
|
+
if utils.match_response(http_res, "5XX", "*"):
|
725
789
|
http_res_text = await utils.stream_to_text_async(http_res)
|
726
790
|
raise models.APIError(
|
727
791
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -830,14 +894,22 @@ class Organizations(BaseSDK):
|
|
830
894
|
if utils.match_response(http_res, "200", "application/json"):
|
831
895
|
return utils.unmarshal_json(http_res.text, models.UserModelOutput)
|
832
896
|
if utils.match_response(
|
833
|
-
http_res, ["400", "401", "403", "404"
|
897
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
834
898
|
):
|
835
899
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
836
900
|
raise models.ErrorResponse(data=data)
|
837
901
|
if utils.match_response(http_res, "422", "application/json"):
|
838
902
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
839
903
|
raise models.HTTPValidationError(data=data)
|
840
|
-
if utils.match_response(http_res,
|
904
|
+
if utils.match_response(http_res, "500", "application/json"):
|
905
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
906
|
+
raise models.ErrorResponse(data=data)
|
907
|
+
if utils.match_response(http_res, "4XX", "*"):
|
908
|
+
http_res_text = utils.stream_to_text(http_res)
|
909
|
+
raise models.APIError(
|
910
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
911
|
+
)
|
912
|
+
if utils.match_response(http_res, "5XX", "*"):
|
841
913
|
http_res_text = utils.stream_to_text(http_res)
|
842
914
|
raise models.APIError(
|
843
915
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -946,14 +1018,22 @@ class Organizations(BaseSDK):
|
|
946
1018
|
if utils.match_response(http_res, "200", "application/json"):
|
947
1019
|
return utils.unmarshal_json(http_res.text, models.UserModelOutput)
|
948
1020
|
if utils.match_response(
|
949
|
-
http_res, ["400", "401", "403", "404"
|
1021
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
950
1022
|
):
|
951
1023
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
952
1024
|
raise models.ErrorResponse(data=data)
|
953
1025
|
if utils.match_response(http_res, "422", "application/json"):
|
954
1026
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
955
1027
|
raise models.HTTPValidationError(data=data)
|
956
|
-
if utils.match_response(http_res,
|
1028
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1029
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1030
|
+
raise models.ErrorResponse(data=data)
|
1031
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1032
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1033
|
+
raise models.APIError(
|
1034
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1035
|
+
)
|
1036
|
+
if utils.match_response(http_res, "5XX", "*"):
|
957
1037
|
http_res_text = await utils.stream_to_text_async(http_res)
|
958
1038
|
raise models.APIError(
|
959
1039
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1043,14 +1123,22 @@ class Organizations(BaseSDK):
|
|
1043
1123
|
if utils.match_response(http_res, "200", "application/json"):
|
1044
1124
|
return utils.unmarshal_json(http_res.text, models.APIKey)
|
1045
1125
|
if utils.match_response(
|
1046
|
-
http_res, ["400", "401", "403", "404"
|
1126
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1047
1127
|
):
|
1048
1128
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1049
1129
|
raise models.ErrorResponse(data=data)
|
1050
1130
|
if utils.match_response(http_res, "422", "application/json"):
|
1051
1131
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1052
1132
|
raise models.HTTPValidationError(data=data)
|
1053
|
-
if utils.match_response(http_res,
|
1133
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1134
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1135
|
+
raise models.ErrorResponse(data=data)
|
1136
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1137
|
+
http_res_text = utils.stream_to_text(http_res)
|
1138
|
+
raise models.APIError(
|
1139
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1140
|
+
)
|
1141
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1054
1142
|
http_res_text = utils.stream_to_text(http_res)
|
1055
1143
|
raise models.APIError(
|
1056
1144
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1140,14 +1228,22 @@ class Organizations(BaseSDK):
|
|
1140
1228
|
if utils.match_response(http_res, "200", "application/json"):
|
1141
1229
|
return utils.unmarshal_json(http_res.text, models.APIKey)
|
1142
1230
|
if utils.match_response(
|
1143
|
-
http_res, ["400", "401", "403", "404"
|
1231
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1144
1232
|
):
|
1145
1233
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1146
1234
|
raise models.ErrorResponse(data=data)
|
1147
1235
|
if utils.match_response(http_res, "422", "application/json"):
|
1148
1236
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1149
1237
|
raise models.HTTPValidationError(data=data)
|
1150
|
-
if utils.match_response(http_res,
|
1238
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1239
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1240
|
+
raise models.ErrorResponse(data=data)
|
1241
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1242
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1243
|
+
raise models.APIError(
|
1244
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1245
|
+
)
|
1246
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1151
1247
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1152
1248
|
raise models.APIError(
|
1153
1249
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1239,14 +1335,22 @@ class Organizations(BaseSDK):
|
|
1239
1335
|
if utils.match_response(http_res, "200", "application/json"):
|
1240
1336
|
return utils.unmarshal_json(http_res.text, Any)
|
1241
1337
|
if utils.match_response(
|
1242
|
-
http_res, ["400", "401", "403", "404"
|
1338
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1243
1339
|
):
|
1244
1340
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1245
1341
|
raise models.ErrorResponse(data=data)
|
1246
1342
|
if utils.match_response(http_res, "422", "application/json"):
|
1247
1343
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1248
1344
|
raise models.HTTPValidationError(data=data)
|
1249
|
-
if utils.match_response(http_res,
|
1345
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1346
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1347
|
+
raise models.ErrorResponse(data=data)
|
1348
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1349
|
+
http_res_text = utils.stream_to_text(http_res)
|
1350
|
+
raise models.APIError(
|
1351
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1352
|
+
)
|
1353
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1250
1354
|
http_res_text = utils.stream_to_text(http_res)
|
1251
1355
|
raise models.APIError(
|
1252
1356
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1338,14 +1442,22 @@ class Organizations(BaseSDK):
|
|
1338
1442
|
if utils.match_response(http_res, "200", "application/json"):
|
1339
1443
|
return utils.unmarshal_json(http_res.text, Any)
|
1340
1444
|
if utils.match_response(
|
1341
|
-
http_res, ["400", "401", "403", "404"
|
1445
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1342
1446
|
):
|
1343
1447
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1344
1448
|
raise models.ErrorResponse(data=data)
|
1345
1449
|
if utils.match_response(http_res, "422", "application/json"):
|
1346
1450
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1347
1451
|
raise models.HTTPValidationError(data=data)
|
1348
|
-
if utils.match_response(http_res,
|
1452
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1453
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1454
|
+
raise models.ErrorResponse(data=data)
|
1455
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1456
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1457
|
+
raise models.APIError(
|
1458
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1459
|
+
)
|
1460
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1349
1461
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1350
1462
|
raise models.APIError(
|
1351
1463
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1448,14 +1560,22 @@ class Organizations(BaseSDK):
|
|
1448
1560
|
if utils.match_response(http_res, "200", "application/json"):
|
1449
1561
|
return utils.unmarshal_json(http_res.text, models.APIKey)
|
1450
1562
|
if utils.match_response(
|
1451
|
-
http_res, ["400", "401", "403", "404"
|
1563
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1452
1564
|
):
|
1453
1565
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1454
1566
|
raise models.ErrorResponse(data=data)
|
1455
1567
|
if utils.match_response(http_res, "422", "application/json"):
|
1456
1568
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1457
1569
|
raise models.HTTPValidationError(data=data)
|
1458
|
-
if utils.match_response(http_res,
|
1570
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1571
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1572
|
+
raise models.ErrorResponse(data=data)
|
1573
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1574
|
+
http_res_text = utils.stream_to_text(http_res)
|
1575
|
+
raise models.APIError(
|
1576
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1577
|
+
)
|
1578
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1459
1579
|
http_res_text = utils.stream_to_text(http_res)
|
1460
1580
|
raise models.APIError(
|
1461
1581
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -1558,14 +1678,22 @@ class Organizations(BaseSDK):
|
|
1558
1678
|
if utils.match_response(http_res, "200", "application/json"):
|
1559
1679
|
return utils.unmarshal_json(http_res.text, models.APIKey)
|
1560
1680
|
if utils.match_response(
|
1561
|
-
http_res, ["400", "401", "403", "404"
|
1681
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
1562
1682
|
):
|
1563
1683
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1564
1684
|
raise models.ErrorResponse(data=data)
|
1565
1685
|
if utils.match_response(http_res, "422", "application/json"):
|
1566
1686
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
1567
1687
|
raise models.HTTPValidationError(data=data)
|
1568
|
-
if utils.match_response(http_res,
|
1688
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1689
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
1690
|
+
raise models.ErrorResponse(data=data)
|
1691
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1692
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1693
|
+
raise models.APIError(
|
1694
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
1695
|
+
)
|
1696
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1569
1697
|
http_res_text = await utils.stream_to_text_async(http_res)
|
1570
1698
|
raise models.APIError(
|
1571
1699
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
mixpeek/tasks.py
CHANGED
@@ -85,14 +85,22 @@ class Tasks(BaseSDK):
|
|
85
85
|
if utils.match_response(http_res, "200", "application/json"):
|
86
86
|
return utils.unmarshal_json(http_res.text, Any)
|
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 Tasks(BaseSDK):
|
|
183
191
|
if utils.match_response(http_res, "200", "application/json"):
|
184
192
|
return utils.unmarshal_json(http_res.text, Any)
|
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
|
@@ -283,14 +299,22 @@ class Tasks(BaseSDK):
|
|
283
299
|
if utils.match_response(http_res, "200", "application/json"):
|
284
300
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
285
301
|
if utils.match_response(
|
286
|
-
http_res, ["400", "401", "403", "404"
|
302
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
287
303
|
):
|
288
304
|
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
289
305
|
raise models.ErrorResponse(data=data)
|
290
306
|
if utils.match_response(http_res, "422", "application/json"):
|
291
307
|
data = utils.unmarshal_json(http_res.text, models.HTTPValidationErrorData)
|
292
308
|
raise models.HTTPValidationError(data=data)
|
293
|
-
if utils.match_response(http_res,
|
309
|
+
if utils.match_response(http_res, "500", "application/json"):
|
310
|
+
data = utils.unmarshal_json(http_res.text, models.ErrorResponseData)
|
311
|
+
raise models.ErrorResponse(data=data)
|
312
|
+
if utils.match_response(http_res, "4XX", "*"):
|
313
|
+
http_res_text = utils.stream_to_text(http_res)
|
314
|
+
raise models.APIError(
|
315
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
316
|
+
)
|
317
|
+
if utils.match_response(http_res, "5XX", "*"):
|
294
318
|
http_res_text = utils.stream_to_text(http_res)
|
295
319
|
raise models.APIError(
|
296
320
|
"API error occurred", http_res.status_code, http_res_text, http_res
|
@@ -383,14 +407,22 @@ class Tasks(BaseSDK):
|
|
383
407
|
if utils.match_response(http_res, "200", "application/json"):
|
384
408
|
return utils.unmarshal_json(http_res.text, models.TaskResponse)
|
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
|