python-amazon-ad-api 1.2.4__py3-none-any.whl → 1.2.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.
- ad_api/api/history.py +42 -19
- ad_api/version.py +1 -1
- {python_amazon_ad_api-1.2.4.dist-info → python_amazon_ad_api-1.2.5.dist-info}/METADATA +1 -1
- {python_amazon_ad_api-1.2.4.dist-info → python_amazon_ad_api-1.2.5.dist-info}/RECORD +7 -7
- {python_amazon_ad_api-1.2.4.dist-info → python_amazon_ad_api-1.2.5.dist-info}/WHEEL +0 -0
- {python_amazon_ad_api-1.2.4.dist-info → python_amazon_ad_api-1.2.5.dist-info}/licenses/LICENSE +0 -0
- {python_amazon_ad_api-1.2.4.dist-info → python_amazon_ad_api-1.2.5.dist-info}/top_level.txt +0 -0
ad_api/api/history.py
CHANGED
|
@@ -5,26 +5,49 @@ class History(Client):
|
|
|
5
5
|
""" """
|
|
6
6
|
|
|
7
7
|
@sp_endpoint('/history', method='POST')
|
|
8
|
-
def get_history(self, **kwargs) -> ApiResponse:
|
|
8
|
+
def get_history(self, version: str = "1.0", **kwargs) -> ApiResponse:
|
|
9
9
|
r"""
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
Returns the changes made to campaigns, ad groups, ads and the rest of the
|
|
11
|
+
entity tree, within a time range. Only events belonging to the
|
|
12
|
+
authenticated advertiser come back.
|
|
13
|
+
|
|
14
|
+
Keyword Args
|
|
15
|
+
|
|
16
|
+
- ``version`` (string): the ``Accept`` version, ``"1.0"`` by default.
|
|
17
|
+
Pass ``"1.1"`` to query the ``THEME`` event type, which the service
|
|
18
|
+
refuses at 1.0. The other six types work at either. [optional]
|
|
19
|
+
|
|
20
|
+
Request Body (required)
|
|
21
|
+
|
|
22
|
+
- ``fromDate`` (integer): epoch in **milliseconds**, not seconds.
|
|
23
|
+
- ``toDate`` (integer): epoch in milliseconds.
|
|
24
|
+
- ``eventTypes`` (object): one or more of ``AD``, ``AD_GROUP``,
|
|
25
|
+
``CAMPAIGN``, ``KEYWORD``, ``NEGATIVE_KEYWORD``, ``PRODUCT_TARGETING``
|
|
26
|
+
and ``THEME``. Each carries an object, usually ``{}`` or
|
|
27
|
+
``{"filters": [...]}``.
|
|
28
|
+
- ``count`` (integer): page size. Default 100, minimum 50, maximum 200.
|
|
29
|
+
- ``nextToken`` (string): token from a previous answer. Mutually
|
|
30
|
+
exclusive with ``pageOffset``.
|
|
31
|
+
- ``pageOffset`` (integer): alternative to ``nextToken``, up to 10000.
|
|
32
|
+
- ``sort`` (object): ``{"direction": "ASC"|"DESC", "key": "DATE"}``.
|
|
33
|
+
|
|
34
|
+
The field names are camelCase and the service rejects anything else: a
|
|
35
|
+
body written with ``from_date`` answers ``400`` naming ``fromDate`` as a
|
|
36
|
+
required field. The dates are counted back from the moment of the
|
|
37
|
+
request, so a window computed once and reused drifts out of range: the
|
|
38
|
+
service measures 90 days from its own clock, and a few seconds of drift
|
|
39
|
+
past the edge answers ``400 fromDate is more than 90 days ago``.
|
|
40
|
+
|
|
41
|
+
This route throttles. Seven calls within twelve seconds answered ``429``.
|
|
42
|
+
|
|
43
|
+
Returns
|
|
44
|
+
ApiResponse with ``events``, ``pageSize``, ``pageOffset``,
|
|
45
|
+
``maxPageNumber`` and ``totalRecords``. An empty ``events`` with
|
|
46
|
+
``totalRecords`` at ``0`` means the account saw no change in the
|
|
47
|
+
window, not that the call failed.
|
|
27
48
|
|
|
28
49
|
"""
|
|
50
|
+
accept = 'application/vnd.historyresponse.v' + version + '+json'
|
|
51
|
+
headers = {'Accept': accept}
|
|
29
52
|
body = Utils.convert_body(kwargs.pop('body'), wrap=False)
|
|
30
|
-
return self._request(kwargs.pop('path'), data=body, params=kwargs)
|
|
53
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
ad_api/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.2.
|
|
1
|
+
__version__ = "1.2.5"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
ad_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
ad_api/version.py,sha256=
|
|
2
|
+
ad_api/version.py,sha256=jBmZf3HLbiQlWiolOsAA6J5-BbxXD2bqFqEqDH3lfqo,22
|
|
3
3
|
ad_api/api/__init__.py,sha256=E9c0ZyK4vplMlKKEBF8CV5u7P4uSkTMSQsAuSQu5bfY,1514
|
|
4
4
|
ad_api/api/account.py,sha256=CmOvCfHoPWaeTUJvtB0pNoNulZVSz4oMMCKIpVTpHos,2931
|
|
5
5
|
ad_api/api/advertising_test_account.py,sha256=btOVbdk2tBDmyKSJaQbcIFyzNG8KFJVUmTe4p9xMhpU,1507
|
|
@@ -10,7 +10,7 @@ ad_api/api/brand_metrics.py,sha256=IlOlVJ2t6cL5DA49RaM3M1AW_3KFEyal08e0ZcnLdVE,6
|
|
|
10
10
|
ad_api/api/creative_assets.py,sha256=EzxrQbxMe5Y1b6qONJ3zi8cwoorCZAqSmHhiug6d87E,6671
|
|
11
11
|
ad_api/api/eligibility.py,sha256=xbHMNxpRqToQDlG8y7nhhSr55ZZIJ_ZA304rmWa7Jx0,3680
|
|
12
12
|
ad_api/api/exports.py,sha256=Y59C99axCAltMgu3gbfzdnoLKjNTsJ7s1z18yzcxzls,2788
|
|
13
|
-
ad_api/api/history.py,sha256=
|
|
13
|
+
ad_api/api/history.py,sha256=tB4XawmQNxDMolaubDUjuIHtrYXRFuhOr4WCB8OJ1t8,2568
|
|
14
14
|
ad_api/api/insights.py,sha256=Z4h00erksU58yjGm5qX_sHKDAv5UuJagqCA0d3rUlJU,2932
|
|
15
15
|
ad_api/api/invoices.py,sha256=EwSUVPOTxu1zYPSh0Bg6sCQ22evnUrMJBgU8ZttWN4w,1579
|
|
16
16
|
ad_api/api/localization.py,sha256=HdkChAawloJ8zj5rCye9NVf7kLnQ7vW6aKsBLZ2W-gI,17158
|
|
@@ -108,8 +108,8 @@ ad_api/base/exceptions.py,sha256=9D3M40ZIlLS0fA-aQh1BTWPOW-Nvf0tRhbA85jFnDJ4,438
|
|
|
108
108
|
ad_api/base/helpers.py,sha256=UK7Q13vZ0mNdF54xzfzoGDn2O_cd2yPrK2X4rOzC41c,2334
|
|
109
109
|
ad_api/base/marketplaces.py,sha256=44lvCcluXNpqTprWQ80e3weSQmQbJoWL-WDSOWVbCyQ,4657
|
|
110
110
|
ad_api/base/utils.py,sha256=_qnCBOvyJTLgaZjJzUWTi38GGLHkQszXELs79133Rb4,5618
|
|
111
|
-
python_amazon_ad_api-1.2.
|
|
112
|
-
python_amazon_ad_api-1.2.
|
|
113
|
-
python_amazon_ad_api-1.2.
|
|
114
|
-
python_amazon_ad_api-1.2.
|
|
115
|
-
python_amazon_ad_api-1.2.
|
|
111
|
+
python_amazon_ad_api-1.2.5.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
|
|
112
|
+
python_amazon_ad_api-1.2.5.dist-info/METADATA,sha256=d0ANyn2SfwsIwQhEhdzfFUXzkTonM4Y94nwyDhdyCAU,21479
|
|
113
|
+
python_amazon_ad_api-1.2.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
114
|
+
python_amazon_ad_api-1.2.5.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
|
|
115
|
+
python_amazon_ad_api-1.2.5.dist-info/RECORD,,
|
|
File without changes
|
{python_amazon_ad_api-1.2.4.dist-info → python_amazon_ad_api-1.2.5.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|