ttd-data 0.2.6__tar.gz → 0.2.7__tar.gz
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.
- {ttd_data-0.2.6/src/ttd_data.egg-info → ttd_data-0.2.7}/PKG-INFO +2 -2
- {ttd_data-0.2.6 → ttd_data-0.2.7}/pyproject.toml +2 -2
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/_version.py +3 -3
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/__init__.py +8 -0
- ttd_data-0.2.7/src/ttd_data/errors/ipaddressdataserverresponse_error.py +45 -0
- ttd_data-0.2.7/src/ttd_data/ipaddress.py +475 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/__init__.py +76 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/baseadvertiserdataitem.py +5 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/basepartnerdsrdataitem.py +5 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/basethirdpartydataitem.py +5 -0
- ttd_data-0.2.7/src/ttd_data/models/expandedipaddress.py +63 -0
- ttd_data-0.2.7/src/ttd_data/models/ingestfirstpartyipaddressdataop.py +70 -0
- ttd_data-0.2.7/src/ttd_data/models/ingestthirdpartyipaddressdataop.py +70 -0
- ttd_data-0.2.7/src/ttd_data/models/ipaddressdata.py +99 -0
- ttd_data-0.2.7/src/ttd_data/models/ipaddressdataitem.py +145 -0
- ttd_data-0.2.7/src/ttd_data/models/ipaddressdatarequest.py +59 -0
- ttd_data-0.2.7/src/ttd_data/models/ipaddressdataresponseerrorcode.py +15 -0
- ttd_data-0.2.7/src/ttd_data/models/ipaddressdataserverresponse.py +60 -0
- ttd_data-0.2.7/src/ttd_data/models/ipaddressdataserverresponseline.py +85 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/sdk.py +3 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7/src/ttd_data.egg-info}/PKG-INFO +2 -2
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data.egg-info/SOURCES.txt +11 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data.egg-info/requires.txt +1 -1
- {ttd_data-0.2.6 → ttd_data-0.2.7}/LICENSE +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/NOTICES.txt +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/README-PYPI.md +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/README.md +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/setup.cfg +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/__init__.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/_hooks/__init__.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/_hooks/data_origins_hook.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/_hooks/plain_text_error_normalizer.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/_hooks/registration.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/_hooks/sdkhooks.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/_hooks/types.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/advertiser.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/basesdk.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/client.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/deletionoptout.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/advertiserdataserverresponse_error.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/advertiserdsrresponse_error.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/apierror.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/dataerror.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/merchantdsrresponse_error.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/no_response_error.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/offlineconversiondataserverresponse_error.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/responsevalidationerror.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/thirdpartydataserverresponse_error.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/thirdpartydsrresponse_error.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/ttddataerror.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/errors/uid2serviceerror.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/httpclient.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/advertiserdata.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/advertiserdatarequest.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/advertiserdataresponseerrorcode.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/advertiserdataserverresponse.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/advertiserdataserverresponseline.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/advertiserdsrfailedline.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/advertiserdsrrequest.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/advertiserdsrresponse.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/baseofflineconversiondataitem.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/dataorigin.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/dataorigintype.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/datasubjectrequestadvertiserdataop.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/datasubjectrequestmerchantdataop.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/datasubjectrequestthirdpartydataop.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/dsrerrorcode.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/httpmetadata.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/ingestadvertiserdataop.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/ingestofflineconversiondataop.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/ingestthirdpartydataop.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/merchantdsrfailedline.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/merchantdsrrequest.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/merchantdsrresponse.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/offlineconversiondatarequest.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/offlineconversiondataresponseerrorcode.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/offlineconversiondataserverresponse.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/offlineconversiondataserverresponseline.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/partnerdsrrequesttype.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/realtimeconversioneventlineitem.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/realtimeconversioneventsprivacysetting.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/thirdpartydata.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/thirdpartydatarequest.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/thirdpartydataresponseerrorcode.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/thirdpartydataserverresponse.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/thirdpartydataserverresponseline.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/thirdpartydsrfailedline.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/thirdpartydsrrequest.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/models/thirdpartydsrresponse.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/offlineconversion.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/py.typed +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/sdkconfiguration.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/thirdparty.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/types/__init__.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/types/base64fileinput.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/types/basemodel.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/uid2/__init__.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/uid2/config.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/uid2/models.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/uid2/resolver.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/__init__.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/annotations.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/datetimes.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/dynamic_imports.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/enums.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/eventstreaming.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/forms.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/headers.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/logger.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/metadata.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/queryparams.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/requestbodies.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/retries.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/security.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/serializers.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/unmarshal_json_response.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/url.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data/utils/values.py +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data.egg-info/dependency_links.txt +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data.egg-info/top_level.txt +0 -0
- {ttd_data-0.2.6 → ttd_data-0.2.7}/src/ttd_data_python/_hooks/registration.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ttd-data
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Python Client SDK for TTD Data API.
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
License: map[name:Apache License 2.0 shortName:Apache-2.0 url:https://www.apache.org/licenses/LICENSE-2.0]
|
|
@@ -11,7 +11,7 @@ License-File: LICENSE
|
|
|
11
11
|
License-File: NOTICES.txt
|
|
12
12
|
Requires-Dist: httpcore>=1.0.9
|
|
13
13
|
Requires-Dist: httpx>=0.28.1
|
|
14
|
-
Requires-Dist: pydantic
|
|
14
|
+
Requires-Dist: pydantic>=2.11.2
|
|
15
15
|
Requires-Dist: uid2-client<3.0.0,>=2.9.0
|
|
16
16
|
Dynamic: license-file
|
|
17
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ttd-data"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.7"
|
|
4
4
|
description = "Python Client SDK for TTD Data API."
|
|
5
5
|
authors = [{ name = "Speakeasy" },]
|
|
6
6
|
readme = "README-PYPI.md"
|
|
@@ -8,7 +8,7 @@ requires-python = ">=3.10"
|
|
|
8
8
|
dependencies = [
|
|
9
9
|
"httpcore >=1.0.9",
|
|
10
10
|
"httpx >=0.28.1",
|
|
11
|
-
"pydantic >=2.11.2
|
|
11
|
+
"pydantic >=2.11.2",
|
|
12
12
|
"uid2-client >=2.9.0,<3.0.0",
|
|
13
13
|
]
|
|
14
14
|
urls.repository = "https://github.com/thetradedesk/ttd-data-python.git"
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import importlib.metadata
|
|
5
5
|
|
|
6
6
|
__title__: str = "ttd-data"
|
|
7
|
-
__version__: str = "0.2.
|
|
7
|
+
__version__: str = "0.2.7"
|
|
8
8
|
__openapi_doc_version__: str = "v0.1"
|
|
9
|
-
__gen_version__: str = "2.
|
|
10
|
-
__user_agent__: str = "speakeasy-sdk/python 0.2.
|
|
9
|
+
__gen_version__: str = "2.930.0"
|
|
10
|
+
__user_agent__: str = "speakeasy-sdk/python 0.2.7 2.930.0 v0.1 ttd-data"
|
|
11
11
|
|
|
12
12
|
try:
|
|
13
13
|
if __package__ is not None:
|
|
@@ -19,6 +19,10 @@ if TYPE_CHECKING:
|
|
|
19
19
|
AdvertiserDsrResponseErrorData,
|
|
20
20
|
)
|
|
21
21
|
from .apierror import APIError
|
|
22
|
+
from .ipaddressdataserverresponse_error import (
|
|
23
|
+
IPAddressDataServerResponseError,
|
|
24
|
+
IPAddressDataServerResponseErrorData,
|
|
25
|
+
)
|
|
22
26
|
from .merchantdsrresponse_error import (
|
|
23
27
|
MerchantDsrResponseError,
|
|
24
28
|
MerchantDsrResponseErrorData,
|
|
@@ -45,6 +49,8 @@ __all__ = [
|
|
|
45
49
|
"AdvertiserDsrResponseError",
|
|
46
50
|
"AdvertiserDsrResponseErrorData",
|
|
47
51
|
"DataError",
|
|
52
|
+
"IPAddressDataServerResponseError",
|
|
53
|
+
"IPAddressDataServerResponseErrorData",
|
|
48
54
|
"MerchantDsrResponseError",
|
|
49
55
|
"MerchantDsrResponseErrorData",
|
|
50
56
|
"NoResponseError",
|
|
@@ -64,6 +70,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
64
70
|
"AdvertiserDsrResponseError": ".advertiserdsrresponse_error",
|
|
65
71
|
"AdvertiserDsrResponseErrorData": ".advertiserdsrresponse_error",
|
|
66
72
|
"APIError": ".apierror",
|
|
73
|
+
"IPAddressDataServerResponseError": ".ipaddressdataserverresponse_error",
|
|
74
|
+
"IPAddressDataServerResponseErrorData": ".ipaddressdataserverresponse_error",
|
|
67
75
|
"MerchantDsrResponseError": ".merchantdsrresponse_error",
|
|
68
76
|
"MerchantDsrResponseErrorData": ".merchantdsrresponse_error",
|
|
69
77
|
"NoResponseError": ".no_response_error",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
# @generated-id: d93ef12300f1
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
from dataclasses import dataclass, field
|
|
6
|
+
import httpx
|
|
7
|
+
import pydantic
|
|
8
|
+
from ttd_data.errors import DataError
|
|
9
|
+
from ttd_data.models import (
|
|
10
|
+
httpmetadata as models_httpmetadata,
|
|
11
|
+
ipaddressdataserverresponseline as models_ipaddressdataserverresponseline,
|
|
12
|
+
)
|
|
13
|
+
from ttd_data.types import BaseModel, OptionalNullable, UNSET
|
|
14
|
+
from typing import List, Optional
|
|
15
|
+
from typing_extensions import Annotated
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class IPAddressDataServerResponseErrorData(BaseModel):
|
|
19
|
+
http_meta: Annotated[
|
|
20
|
+
Optional[models_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True)
|
|
21
|
+
] = None
|
|
22
|
+
data_owner_id: Annotated[
|
|
23
|
+
OptionalNullable[str], pydantic.Field(alias="DataOwnerId")
|
|
24
|
+
] = UNSET
|
|
25
|
+
failed_lines: Annotated[
|
|
26
|
+
OptionalNullable[
|
|
27
|
+
List[models_ipaddressdataserverresponseline.IPAddressDataServerResponseLine]
|
|
28
|
+
],
|
|
29
|
+
pydantic.Field(alias="FailedLines"),
|
|
30
|
+
] = UNSET
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass(unsafe_hash=True)
|
|
34
|
+
class IPAddressDataServerResponseError(DataError):
|
|
35
|
+
data: IPAddressDataServerResponseErrorData = field(hash=False)
|
|
36
|
+
|
|
37
|
+
def __init__(
|
|
38
|
+
self,
|
|
39
|
+
data: IPAddressDataServerResponseErrorData,
|
|
40
|
+
raw_response: httpx.Response,
|
|
41
|
+
body: Optional[str] = None,
|
|
42
|
+
):
|
|
43
|
+
message = body or raw_response.text
|
|
44
|
+
super().__init__(message, raw_response, body)
|
|
45
|
+
object.__setattr__(self, "data", data)
|
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
# @generated-id: f319e8f096ff
|
|
3
|
+
|
|
4
|
+
from .basesdk import BaseSDK
|
|
5
|
+
from ttd_data import errors, models, utils
|
|
6
|
+
from ttd_data._hooks import HookContext
|
|
7
|
+
from ttd_data.types import OptionalNullable, UNSET
|
|
8
|
+
from ttd_data.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
+
from typing import Any, Iterable, List, Mapping, Optional, Union
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class IPAddress(BaseSDK):
|
|
13
|
+
def ingest_first_party_ip_address_data(
|
|
14
|
+
self,
|
|
15
|
+
*,
|
|
16
|
+
ttd_auth: str,
|
|
17
|
+
data_owner_id: str,
|
|
18
|
+
items: OptionalNullable[
|
|
19
|
+
Union[
|
|
20
|
+
Iterable[models.IPAddressDataItem],
|
|
21
|
+
Iterable[models.IPAddressDataItemTypedDict],
|
|
22
|
+
]
|
|
23
|
+
] = UNSET,
|
|
24
|
+
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
25
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
26
|
+
server_url: Optional[str] = None,
|
|
27
|
+
timeout_ms: Optional[int] = None,
|
|
28
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
29
|
+
) -> models.IngestFirstPartyIPAddressDataResponse:
|
|
30
|
+
r"""Upload first-party IP address data for the specified ID.
|
|
31
|
+
|
|
32
|
+
:param ttd_auth: Data API token for authentication.
|
|
33
|
+
:param data_owner_id:
|
|
34
|
+
:param items:
|
|
35
|
+
:param data_load_trace_id:
|
|
36
|
+
:param retries: Override the default retry configuration for this method
|
|
37
|
+
:param server_url: Override the default server URL for this method
|
|
38
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
39
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
40
|
+
"""
|
|
41
|
+
base_url = None
|
|
42
|
+
url_variables = None
|
|
43
|
+
if timeout_ms is None:
|
|
44
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
45
|
+
|
|
46
|
+
if server_url is not None:
|
|
47
|
+
base_url = server_url
|
|
48
|
+
else:
|
|
49
|
+
base_url = models.INGEST_FIRST_PARTY_IP_ADDRESS_DATA_OP_SERVERS[0]
|
|
50
|
+
|
|
51
|
+
request = models.IngestFirstPartyIPAddressDataRequest(
|
|
52
|
+
ttd_auth=ttd_auth,
|
|
53
|
+
body=models.IPAddressDataRequest(
|
|
54
|
+
data_owner_id=data_owner_id,
|
|
55
|
+
items=utils.get_pydantic_model(
|
|
56
|
+
items, OptionalNullable[List[models.IPAddressDataItem]]
|
|
57
|
+
),
|
|
58
|
+
data_load_trace_id=data_load_trace_id,
|
|
59
|
+
),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
req = self._build_request(
|
|
63
|
+
method="POST",
|
|
64
|
+
path="/data/firstpartyipaddress",
|
|
65
|
+
base_url=base_url,
|
|
66
|
+
url_variables=url_variables,
|
|
67
|
+
request=request,
|
|
68
|
+
request_body_required=True,
|
|
69
|
+
request_has_path_params=False,
|
|
70
|
+
request_has_query_params=False,
|
|
71
|
+
user_agent_header="user-agent",
|
|
72
|
+
accept_header_value="application/json",
|
|
73
|
+
http_headers=http_headers,
|
|
74
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
75
|
+
request.body, False, False, "json", models.IPAddressDataRequest
|
|
76
|
+
),
|
|
77
|
+
allow_empty_value=None,
|
|
78
|
+
timeout_ms=timeout_ms,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
if retries == UNSET:
|
|
82
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
83
|
+
retries = self.sdk_configuration.retry_config
|
|
84
|
+
|
|
85
|
+
retry_config = None
|
|
86
|
+
if isinstance(retries, utils.RetryConfig):
|
|
87
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
88
|
+
|
|
89
|
+
http_res = self.do_request(
|
|
90
|
+
hook_ctx=HookContext(
|
|
91
|
+
config=self.sdk_configuration,
|
|
92
|
+
base_url=base_url or "",
|
|
93
|
+
operation_id="IngestFirstPartyIPAddressData",
|
|
94
|
+
oauth2_scopes=None,
|
|
95
|
+
security_source=None,
|
|
96
|
+
tags=["IPAddress"],
|
|
97
|
+
extensions=None,
|
|
98
|
+
),
|
|
99
|
+
request=req,
|
|
100
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
101
|
+
retry_config=retry_config,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
response_data: Any = None
|
|
105
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
106
|
+
return models.IngestFirstPartyIPAddressDataResponse(
|
|
107
|
+
ip_address_data_server_response=unmarshal_json_response(
|
|
108
|
+
Optional[models.IPAddressDataServerResponse], http_res
|
|
109
|
+
),
|
|
110
|
+
http_meta=models.HTTPMetadata(request=req, response=http_res),
|
|
111
|
+
)
|
|
112
|
+
if utils.match_response(http_res, ["400", "429"], "application/json"):
|
|
113
|
+
response_data = unmarshal_json_response(
|
|
114
|
+
errors.IPAddressDataServerResponseErrorData, http_res
|
|
115
|
+
)
|
|
116
|
+
response_data.http_meta = models.HTTPMetadata(
|
|
117
|
+
request=req, response=http_res
|
|
118
|
+
)
|
|
119
|
+
raise errors.IPAddressDataServerResponseError(response_data, http_res)
|
|
120
|
+
if utils.match_response(http_res, ["401", "403", "4XX"], "*"):
|
|
121
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
122
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
123
|
+
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
124
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
125
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
126
|
+
|
|
127
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
128
|
+
|
|
129
|
+
async def ingest_first_party_ip_address_data_async(
|
|
130
|
+
self,
|
|
131
|
+
*,
|
|
132
|
+
ttd_auth: str,
|
|
133
|
+
data_owner_id: str,
|
|
134
|
+
items: OptionalNullable[
|
|
135
|
+
Union[
|
|
136
|
+
Iterable[models.IPAddressDataItem],
|
|
137
|
+
Iterable[models.IPAddressDataItemTypedDict],
|
|
138
|
+
]
|
|
139
|
+
] = UNSET,
|
|
140
|
+
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
141
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
142
|
+
server_url: Optional[str] = None,
|
|
143
|
+
timeout_ms: Optional[int] = None,
|
|
144
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
145
|
+
) -> models.IngestFirstPartyIPAddressDataResponse:
|
|
146
|
+
r"""Upload first-party IP address data for the specified ID.
|
|
147
|
+
|
|
148
|
+
:param ttd_auth: Data API token for authentication.
|
|
149
|
+
:param data_owner_id:
|
|
150
|
+
:param items:
|
|
151
|
+
:param data_load_trace_id:
|
|
152
|
+
:param retries: Override the default retry configuration for this method
|
|
153
|
+
:param server_url: Override the default server URL for this method
|
|
154
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
155
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
156
|
+
"""
|
|
157
|
+
base_url = None
|
|
158
|
+
url_variables = None
|
|
159
|
+
if timeout_ms is None:
|
|
160
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
161
|
+
|
|
162
|
+
if server_url is not None:
|
|
163
|
+
base_url = server_url
|
|
164
|
+
else:
|
|
165
|
+
base_url = models.INGEST_FIRST_PARTY_IP_ADDRESS_DATA_OP_SERVERS[0]
|
|
166
|
+
|
|
167
|
+
request = models.IngestFirstPartyIPAddressDataRequest(
|
|
168
|
+
ttd_auth=ttd_auth,
|
|
169
|
+
body=models.IPAddressDataRequest(
|
|
170
|
+
data_owner_id=data_owner_id,
|
|
171
|
+
items=utils.get_pydantic_model(
|
|
172
|
+
items, OptionalNullable[List[models.IPAddressDataItem]]
|
|
173
|
+
),
|
|
174
|
+
data_load_trace_id=data_load_trace_id,
|
|
175
|
+
),
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
req = self._build_request_async(
|
|
179
|
+
method="POST",
|
|
180
|
+
path="/data/firstpartyipaddress",
|
|
181
|
+
base_url=base_url,
|
|
182
|
+
url_variables=url_variables,
|
|
183
|
+
request=request,
|
|
184
|
+
request_body_required=True,
|
|
185
|
+
request_has_path_params=False,
|
|
186
|
+
request_has_query_params=False,
|
|
187
|
+
user_agent_header="user-agent",
|
|
188
|
+
accept_header_value="application/json",
|
|
189
|
+
http_headers=http_headers,
|
|
190
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
191
|
+
request.body, False, False, "json", models.IPAddressDataRequest
|
|
192
|
+
),
|
|
193
|
+
allow_empty_value=None,
|
|
194
|
+
timeout_ms=timeout_ms,
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
if retries == UNSET:
|
|
198
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
199
|
+
retries = self.sdk_configuration.retry_config
|
|
200
|
+
|
|
201
|
+
retry_config = None
|
|
202
|
+
if isinstance(retries, utils.RetryConfig):
|
|
203
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
204
|
+
|
|
205
|
+
http_res = await self.do_request_async(
|
|
206
|
+
hook_ctx=HookContext(
|
|
207
|
+
config=self.sdk_configuration,
|
|
208
|
+
base_url=base_url or "",
|
|
209
|
+
operation_id="IngestFirstPartyIPAddressData",
|
|
210
|
+
oauth2_scopes=None,
|
|
211
|
+
security_source=None,
|
|
212
|
+
tags=["IPAddress"],
|
|
213
|
+
extensions=None,
|
|
214
|
+
),
|
|
215
|
+
request=req,
|
|
216
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
217
|
+
retry_config=retry_config,
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
response_data: Any = None
|
|
221
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
222
|
+
return models.IngestFirstPartyIPAddressDataResponse(
|
|
223
|
+
ip_address_data_server_response=unmarshal_json_response(
|
|
224
|
+
Optional[models.IPAddressDataServerResponse], http_res
|
|
225
|
+
),
|
|
226
|
+
http_meta=models.HTTPMetadata(request=req, response=http_res),
|
|
227
|
+
)
|
|
228
|
+
if utils.match_response(http_res, ["400", "429"], "application/json"):
|
|
229
|
+
response_data = unmarshal_json_response(
|
|
230
|
+
errors.IPAddressDataServerResponseErrorData, http_res
|
|
231
|
+
)
|
|
232
|
+
response_data.http_meta = models.HTTPMetadata(
|
|
233
|
+
request=req, response=http_res
|
|
234
|
+
)
|
|
235
|
+
raise errors.IPAddressDataServerResponseError(response_data, http_res)
|
|
236
|
+
if utils.match_response(http_res, ["401", "403", "4XX"], "*"):
|
|
237
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
238
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
239
|
+
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
240
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
241
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
242
|
+
|
|
243
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
244
|
+
|
|
245
|
+
def ingest_third_party_ip_address_data(
|
|
246
|
+
self,
|
|
247
|
+
*,
|
|
248
|
+
ttd_auth: str,
|
|
249
|
+
data_owner_id: str,
|
|
250
|
+
items: OptionalNullable[
|
|
251
|
+
Union[
|
|
252
|
+
Iterable[models.IPAddressDataItem],
|
|
253
|
+
Iterable[models.IPAddressDataItemTypedDict],
|
|
254
|
+
]
|
|
255
|
+
] = UNSET,
|
|
256
|
+
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
257
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
258
|
+
server_url: Optional[str] = None,
|
|
259
|
+
timeout_ms: Optional[int] = None,
|
|
260
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
261
|
+
) -> models.IngestThirdPartyIPAddressDataResponse:
|
|
262
|
+
r"""Upload third-party IP address data for the specified ID.
|
|
263
|
+
|
|
264
|
+
:param ttd_auth: Data API token for authentication.
|
|
265
|
+
:param data_owner_id:
|
|
266
|
+
:param items:
|
|
267
|
+
:param data_load_trace_id:
|
|
268
|
+
:param retries: Override the default retry configuration for this method
|
|
269
|
+
:param server_url: Override the default server URL for this method
|
|
270
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
271
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
272
|
+
"""
|
|
273
|
+
base_url = None
|
|
274
|
+
url_variables = None
|
|
275
|
+
if timeout_ms is None:
|
|
276
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
277
|
+
|
|
278
|
+
if server_url is not None:
|
|
279
|
+
base_url = server_url
|
|
280
|
+
else:
|
|
281
|
+
base_url = models.INGEST_THIRD_PARTY_IP_ADDRESS_DATA_OP_SERVERS[0]
|
|
282
|
+
|
|
283
|
+
request = models.IngestThirdPartyIPAddressDataRequest(
|
|
284
|
+
ttd_auth=ttd_auth,
|
|
285
|
+
body=models.IPAddressDataRequest(
|
|
286
|
+
data_owner_id=data_owner_id,
|
|
287
|
+
items=utils.get_pydantic_model(
|
|
288
|
+
items, OptionalNullable[List[models.IPAddressDataItem]]
|
|
289
|
+
),
|
|
290
|
+
data_load_trace_id=data_load_trace_id,
|
|
291
|
+
),
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
req = self._build_request(
|
|
295
|
+
method="POST",
|
|
296
|
+
path="/data/thirdpartyipaddress",
|
|
297
|
+
base_url=base_url,
|
|
298
|
+
url_variables=url_variables,
|
|
299
|
+
request=request,
|
|
300
|
+
request_body_required=True,
|
|
301
|
+
request_has_path_params=False,
|
|
302
|
+
request_has_query_params=False,
|
|
303
|
+
user_agent_header="user-agent",
|
|
304
|
+
accept_header_value="application/json",
|
|
305
|
+
http_headers=http_headers,
|
|
306
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
307
|
+
request.body, False, False, "json", models.IPAddressDataRequest
|
|
308
|
+
),
|
|
309
|
+
allow_empty_value=None,
|
|
310
|
+
timeout_ms=timeout_ms,
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
if retries == UNSET:
|
|
314
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
315
|
+
retries = self.sdk_configuration.retry_config
|
|
316
|
+
|
|
317
|
+
retry_config = None
|
|
318
|
+
if isinstance(retries, utils.RetryConfig):
|
|
319
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
320
|
+
|
|
321
|
+
http_res = self.do_request(
|
|
322
|
+
hook_ctx=HookContext(
|
|
323
|
+
config=self.sdk_configuration,
|
|
324
|
+
base_url=base_url or "",
|
|
325
|
+
operation_id="IngestThirdPartyIPAddressData",
|
|
326
|
+
oauth2_scopes=None,
|
|
327
|
+
security_source=None,
|
|
328
|
+
tags=["IPAddress"],
|
|
329
|
+
extensions=None,
|
|
330
|
+
),
|
|
331
|
+
request=req,
|
|
332
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
333
|
+
retry_config=retry_config,
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
response_data: Any = None
|
|
337
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
338
|
+
return models.IngestThirdPartyIPAddressDataResponse(
|
|
339
|
+
ip_address_data_server_response=unmarshal_json_response(
|
|
340
|
+
Optional[models.IPAddressDataServerResponse], http_res
|
|
341
|
+
),
|
|
342
|
+
http_meta=models.HTTPMetadata(request=req, response=http_res),
|
|
343
|
+
)
|
|
344
|
+
if utils.match_response(http_res, ["400", "429"], "application/json"):
|
|
345
|
+
response_data = unmarshal_json_response(
|
|
346
|
+
errors.IPAddressDataServerResponseErrorData, http_res
|
|
347
|
+
)
|
|
348
|
+
response_data.http_meta = models.HTTPMetadata(
|
|
349
|
+
request=req, response=http_res
|
|
350
|
+
)
|
|
351
|
+
raise errors.IPAddressDataServerResponseError(response_data, http_res)
|
|
352
|
+
if utils.match_response(http_res, ["401", "403", "4XX"], "*"):
|
|
353
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
354
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
355
|
+
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
356
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
357
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
358
|
+
|
|
359
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
360
|
+
|
|
361
|
+
async def ingest_third_party_ip_address_data_async(
|
|
362
|
+
self,
|
|
363
|
+
*,
|
|
364
|
+
ttd_auth: str,
|
|
365
|
+
data_owner_id: str,
|
|
366
|
+
items: OptionalNullable[
|
|
367
|
+
Union[
|
|
368
|
+
Iterable[models.IPAddressDataItem],
|
|
369
|
+
Iterable[models.IPAddressDataItemTypedDict],
|
|
370
|
+
]
|
|
371
|
+
] = UNSET,
|
|
372
|
+
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
373
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
374
|
+
server_url: Optional[str] = None,
|
|
375
|
+
timeout_ms: Optional[int] = None,
|
|
376
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
377
|
+
) -> models.IngestThirdPartyIPAddressDataResponse:
|
|
378
|
+
r"""Upload third-party IP address data for the specified ID.
|
|
379
|
+
|
|
380
|
+
:param ttd_auth: Data API token for authentication.
|
|
381
|
+
:param data_owner_id:
|
|
382
|
+
:param items:
|
|
383
|
+
:param data_load_trace_id:
|
|
384
|
+
:param retries: Override the default retry configuration for this method
|
|
385
|
+
:param server_url: Override the default server URL for this method
|
|
386
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
387
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
388
|
+
"""
|
|
389
|
+
base_url = None
|
|
390
|
+
url_variables = None
|
|
391
|
+
if timeout_ms is None:
|
|
392
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
393
|
+
|
|
394
|
+
if server_url is not None:
|
|
395
|
+
base_url = server_url
|
|
396
|
+
else:
|
|
397
|
+
base_url = models.INGEST_THIRD_PARTY_IP_ADDRESS_DATA_OP_SERVERS[0]
|
|
398
|
+
|
|
399
|
+
request = models.IngestThirdPartyIPAddressDataRequest(
|
|
400
|
+
ttd_auth=ttd_auth,
|
|
401
|
+
body=models.IPAddressDataRequest(
|
|
402
|
+
data_owner_id=data_owner_id,
|
|
403
|
+
items=utils.get_pydantic_model(
|
|
404
|
+
items, OptionalNullable[List[models.IPAddressDataItem]]
|
|
405
|
+
),
|
|
406
|
+
data_load_trace_id=data_load_trace_id,
|
|
407
|
+
),
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
req = self._build_request_async(
|
|
411
|
+
method="POST",
|
|
412
|
+
path="/data/thirdpartyipaddress",
|
|
413
|
+
base_url=base_url,
|
|
414
|
+
url_variables=url_variables,
|
|
415
|
+
request=request,
|
|
416
|
+
request_body_required=True,
|
|
417
|
+
request_has_path_params=False,
|
|
418
|
+
request_has_query_params=False,
|
|
419
|
+
user_agent_header="user-agent",
|
|
420
|
+
accept_header_value="application/json",
|
|
421
|
+
http_headers=http_headers,
|
|
422
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
423
|
+
request.body, False, False, "json", models.IPAddressDataRequest
|
|
424
|
+
),
|
|
425
|
+
allow_empty_value=None,
|
|
426
|
+
timeout_ms=timeout_ms,
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
if retries == UNSET:
|
|
430
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
431
|
+
retries = self.sdk_configuration.retry_config
|
|
432
|
+
|
|
433
|
+
retry_config = None
|
|
434
|
+
if isinstance(retries, utils.RetryConfig):
|
|
435
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
436
|
+
|
|
437
|
+
http_res = await self.do_request_async(
|
|
438
|
+
hook_ctx=HookContext(
|
|
439
|
+
config=self.sdk_configuration,
|
|
440
|
+
base_url=base_url or "",
|
|
441
|
+
operation_id="IngestThirdPartyIPAddressData",
|
|
442
|
+
oauth2_scopes=None,
|
|
443
|
+
security_source=None,
|
|
444
|
+
tags=["IPAddress"],
|
|
445
|
+
extensions=None,
|
|
446
|
+
),
|
|
447
|
+
request=req,
|
|
448
|
+
is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
|
|
449
|
+
retry_config=retry_config,
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
response_data: Any = None
|
|
453
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
454
|
+
return models.IngestThirdPartyIPAddressDataResponse(
|
|
455
|
+
ip_address_data_server_response=unmarshal_json_response(
|
|
456
|
+
Optional[models.IPAddressDataServerResponse], http_res
|
|
457
|
+
),
|
|
458
|
+
http_meta=models.HTTPMetadata(request=req, response=http_res),
|
|
459
|
+
)
|
|
460
|
+
if utils.match_response(http_res, ["400", "429"], "application/json"):
|
|
461
|
+
response_data = unmarshal_json_response(
|
|
462
|
+
errors.IPAddressDataServerResponseErrorData, http_res
|
|
463
|
+
)
|
|
464
|
+
response_data.http_meta = models.HTTPMetadata(
|
|
465
|
+
request=req, response=http_res
|
|
466
|
+
)
|
|
467
|
+
raise errors.IPAddressDataServerResponseError(response_data, http_res)
|
|
468
|
+
if utils.match_response(http_res, ["401", "403", "4XX"], "*"):
|
|
469
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
470
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
471
|
+
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
472
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
473
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
474
|
+
|
|
475
|
+
raise errors.APIError("Unexpected response received", http_res)
|