python-amazon-ad-api 1.4.3__py3-none-any.whl → 1.4.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/v1/__init__.py +4 -0
- ad_api/api/v1/brand_store_editions.py +52 -0
- ad_api/api/v1/brand_stores.py +52 -0
- ad_api/version.py +1 -1
- {python_amazon_ad_api-1.4.3.dist-info → python_amazon_ad_api-1.4.5.dist-info}/METADATA +3 -1
- {python_amazon_ad_api-1.4.3.dist-info → python_amazon_ad_api-1.4.5.dist-info}/RECORD +9 -7
- {python_amazon_ad_api-1.4.3.dist-info → python_amazon_ad_api-1.4.5.dist-info}/WHEEL +0 -0
- {python_amazon_ad_api-1.4.3.dist-info → python_amazon_ad_api-1.4.5.dist-info}/licenses/LICENSE +0 -0
- {python_amazon_ad_api-1.4.3.dist-info → python_amazon_ad_api-1.4.5.dist-info}/top_level.txt +0 -0
ad_api/api/v1/__init__.py
CHANGED
|
@@ -6,6 +6,8 @@ from .ad_extensions import AdExtensions
|
|
|
6
6
|
from .advertiser_accounts import AdvertiserAccounts
|
|
7
7
|
from .ad_associations import AdAssociations
|
|
8
8
|
from .brand_store_edition_publish_versions import BrandStoreEditionPublishVersions
|
|
9
|
+
from .brand_stores import BrandStores
|
|
10
|
+
from .brand_store_editions import BrandStoreEditions
|
|
9
11
|
|
|
10
12
|
__all__ = [
|
|
11
13
|
"Campaigns",
|
|
@@ -16,4 +18,6 @@ __all__ = [
|
|
|
16
18
|
"AdvertiserAccounts",
|
|
17
19
|
"AdAssociations",
|
|
18
20
|
"BrandStoreEditionPublishVersions",
|
|
21
|
+
"BrandStores",
|
|
22
|
+
"BrandStoreEditions",
|
|
19
23
|
]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class BrandStoreEditions(Client):
|
|
5
|
+
r"""
|
|
6
|
+
BrandStoreEditions(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, debug=False)
|
|
7
|
+
|
|
8
|
+
Amazon Ads API v1 - unified BrandStoreEditions endpoints
|
|
9
|
+
|
|
10
|
+
One route, and it is a ``GET`` with query parameters rather than the POST
|
|
11
|
+
body the rest of v1 uses:
|
|
12
|
+
|
|
13
|
+
GET /adsApi/v1/brandStoreEditions?brandStoreId=<id>
|
|
14
|
+
|
|
15
|
+
Permissions (either): ``amazon_stores_edit`` or ``amazon_stores_view``.
|
|
16
|
+
|
|
17
|
+
This is the middle link of the Stores chain:
|
|
18
|
+
|
|
19
|
+
- :class:`~ad_api.api.v1.BrandStores` gives the ``storeId``.
|
|
20
|
+
- here that becomes ``brandStoreId`` and returns the ``editionId``.
|
|
21
|
+
- :class:`~ad_api.api.v1.BrandStoreEditionPublishVersions` needs both.
|
|
22
|
+
|
|
23
|
+
``maxResults`` is unusual: the range is 11 to 50 with a default of 50, not
|
|
24
|
+
the 1-based range the other families use.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
@sp_endpoint('/adsApi/v1/brandStoreEditions', method='GET')
|
|
28
|
+
def list_brand_store_editions(self, brandStoreId, **kwargs) -> ApiResponse:
|
|
29
|
+
r"""
|
|
30
|
+
list_brand_store_editions(brandStoreId, **kwargs) -> ApiResponse
|
|
31
|
+
|
|
32
|
+
Amazon Ads API v1 - List BrandStoreEditions (operationId: ListBrandStoreEdition)
|
|
33
|
+
|
|
34
|
+
Requires one of these permissions: ["amazon_stores_edit", "amazon_stores_view"]
|
|
35
|
+
|
|
36
|
+
Query parameters
|
|
37
|
+
| **brandStoreId** (string) [required] the store id from BrandStores
|
|
38
|
+
| **maxResults** (int) [optional] range 11..50, default 50
|
|
39
|
+
| **nextToken** (string) [optional] token from a previous answer
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
ApiResponse. ``payload`` holds ``brandStoreEditions`` (0 to 50) and
|
|
43
|
+
``nextToken``. Each edition carries ``editionId``, ``editionName``,
|
|
44
|
+
``storeId`` and ``storeEditionSchedule``.
|
|
45
|
+
|
|
46
|
+
The ``editionId`` is what BrandStoreEditionPublishVersions filters on.
|
|
47
|
+
"""
|
|
48
|
+
path = kwargs.pop('path')
|
|
49
|
+
kwargs.pop('method', None)
|
|
50
|
+
params = dict(kwargs)
|
|
51
|
+
params['brandStoreId'] = brandStoreId
|
|
52
|
+
return self._request(path, params=params)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class BrandStores(Client):
|
|
5
|
+
r"""
|
|
6
|
+
BrandStores(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, debug=False)
|
|
7
|
+
|
|
8
|
+
Amazon Ads API v1 - unified BrandStores endpoints
|
|
9
|
+
|
|
10
|
+
One route: the query. A brand store is listed, never created here.
|
|
11
|
+
|
|
12
|
+
Permissions (any one): advertiser_campaign_edit, creatives_view,
|
|
13
|
+
account_view, creatives_edit, account_edit, campaign_view,
|
|
14
|
+
advertiser_campaign_view, campaign_edit.
|
|
15
|
+
|
|
16
|
+
``storeNameFilter`` is required and takes exactly one name, so this route
|
|
17
|
+
cannot list every store on the account. The answer is the way in to the
|
|
18
|
+
rest of the Stores family: ``storeId`` from here is what
|
|
19
|
+
:class:`~ad_api.api.v1.BrandStoreEditionPublishVersions` needs as
|
|
20
|
+
``storeIdFilter``.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
@sp_endpoint('/adsApi/v1/query/brandStores', method='POST')
|
|
24
|
+
def query_brand_stores(self, **kwargs) -> ApiResponse:
|
|
25
|
+
r"""
|
|
26
|
+
query_brand_stores(body: dict) -> ApiResponse
|
|
27
|
+
|
|
28
|
+
Amazon Ads API v1 - Query BrandStores (operationId: QueryBrandStore)
|
|
29
|
+
|
|
30
|
+
Requires one of these permissions: ["advertiser_campaign_edit",
|
|
31
|
+
"creatives_view", "account_view", "creatives_edit", "account_edit",
|
|
32
|
+
"campaign_view", "advertiser_campaign_view", "campaign_edit"]
|
|
33
|
+
|
|
34
|
+
Request Body [Required]
|
|
35
|
+
| **storeNameFilter** (dict) [required]
|
|
36
|
+
| **include** (list<string>) : exactly one store name
|
|
37
|
+
| **maxResults** (int) [optional]
|
|
38
|
+
| **nextToken** (string) [optional]
|
|
39
|
+
|
|
40
|
+
Returns
|
|
41
|
+
ApiResponse. ``payload`` holds ``brandStores`` and ``nextToken``.
|
|
42
|
+
Each store carries ``storeId`` (required), ``storeName`` and
|
|
43
|
+
``pageInfos``. The ``storeId`` is what the publish-version family
|
|
44
|
+
filters on.
|
|
45
|
+
"""
|
|
46
|
+
headers = {"Accept": "application/json", "Content-Type": "application/json"}
|
|
47
|
+
return self._request(
|
|
48
|
+
kwargs.pop('path'),
|
|
49
|
+
data=Utils.convert_body(kwargs.pop('body'), False),
|
|
50
|
+
params=kwargs,
|
|
51
|
+
headers=headers,
|
|
52
|
+
)
|
ad_api/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.4.
|
|
1
|
+
__version__ = "1.4.5"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-amazon-ad-api
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.5
|
|
4
4
|
Summary: Python wrapper for the Amazon Advertising API
|
|
5
5
|
Home-page: https://github.com/denisneuf/python-amazon-ad-api
|
|
6
6
|
Author: Daniel Alvaro
|
|
@@ -308,6 +308,8 @@ The v1 API lives under `/adsApi/v1/` and is **not** split by product: every call
|
|
|
308
308
|
* [Advertiser Accounts](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/advertiser_accounts.html#ad_api.api.v1.AdvertiserAccounts.AdvertiserAccounts.query_advertiser_accounts)
|
|
309
309
|
* [Ad Associations](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/ad_associations.html#ad_api.api.v1.AdAssociations.AdAssociations.query_ad_associations)
|
|
310
310
|
* [Brand Store Edition Publish Versions](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/brand_store_edition_publish_versions.html#ad_api.api.v1.BrandStoreEditionPublishVersions.BrandStoreEditionPublishVersions.query_brand_store_edition_publish_versions)
|
|
311
|
+
* [Brand Stores](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/brand_stores.html#ad_api.api.v1.BrandStores.BrandStores.query_brand_stores)
|
|
312
|
+
* [Brand Store Editions](https://python-amazon-ad-api.readthedocs.io/en/latest/v1/brand_store_editions.html#ad_api.api.v1.BrandStoreEditions.BrandStoreEditions.list_brand_store_editions)
|
|
311
313
|
|
|
312
314
|
|
|
313
315
|
### [Modules Available Sponsored Products](https://python-amazon-ad-api.readthedocs.io/en/latest/sp.html)
|
|
@@ -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=Fv2JHnR-ADpzdVitwHAsUrkhe-BpoDkmx7MxtXxlm1k,22
|
|
3
3
|
ad_api/api/__init__.py,sha256=TLMefdmuyrj3-vtxGlzX4Sl-lHmE3Rs6daYgw3zwO0c,1600
|
|
4
4
|
ad_api/api/account.py,sha256=CmOvCfHoPWaeTUJvtB0pNoNulZVSz4oMMCKIpVTpHos,2931
|
|
5
5
|
ad_api/api/account_budgets.py,sha256=jFce5eLWAFK3ydjnYR7_Sv7B0-gHTG5bMTx_TcHyy1A,2319
|
|
@@ -89,13 +89,15 @@ ad_api/api/sp/product_recommendations.py,sha256=vXoZIRqcFc5bo9MUprArKndxcEYe_Puy
|
|
|
89
89
|
ad_api/api/sp/product_targeting_v3.py,sha256=vk_T0piHzP5uwt8HSHm5hFKP_0sXJD8nbyooPtM-BTs,9567
|
|
90
90
|
ad_api/api/sp/ranked_keywords_recommendations.py,sha256=QYFje19TFmwhedh7sn5VJIypL8gp6d6tpBQCpf_SIXw,13094
|
|
91
91
|
ad_api/api/sp/schedule_based_bid_optimization.py,sha256=G8VkS7iP1lTIAxZgbfRCLz8njw1DkVH9HQPOZ63pWNU,2371
|
|
92
|
-
ad_api/api/v1/__init__.py,sha256=
|
|
92
|
+
ad_api/api/v1/__init__.py,sha256=Z4bhSFEyWu6SaSLH4kuYw_wAnp0tOR-KO2zqwqhAf0w,652
|
|
93
93
|
ad_api/api/v1/ad_associations.py,sha256=g5L8hAIagmsb-yQ09hP7z1zbVVe868NlpOOokv-Mouc,5812
|
|
94
94
|
ad_api/api/v1/ad_extensions.py,sha256=kL-7xHaXXqb2jXTwZrY0oGttLAG0CW_IjBAqL_CI92U,5519
|
|
95
95
|
ad_api/api/v1/ad_groups.py,sha256=pQhCVdve_O6kbL4mBA5bxxhKcKNl_BKqa7z9DvrxwaM,12626
|
|
96
96
|
ad_api/api/v1/ads.py,sha256=YwZGQ-4WuYquleELtwRI9L8w0fGw7FBRejQE-tZ5hKY,7941
|
|
97
97
|
ad_api/api/v1/advertiser_accounts.py,sha256=_Y8GTHgQ2G-RhNg4cuvvfXvjIhLzstQAGSyr1WMRRfg,5405
|
|
98
98
|
ad_api/api/v1/brand_store_edition_publish_versions.py,sha256=Q8smB7zJJ1cEkYrCEo3_Ws9QICUcBOvB03eM77rlF4I,4258
|
|
99
|
+
ad_api/api/v1/brand_store_editions.py,sha256=sJTZ-DOXSXSVF01-dtt0EZ8bz3CKSlP9c_c0rp40pfM,2113
|
|
100
|
+
ad_api/api/v1/brand_stores.py,sha256=zlBsKiOwmdSiIG9filgdqUlPnV6AX-gE6S5nNyAQACc,2131
|
|
99
101
|
ad_api/api/v1/campaigns.py,sha256=u5PlvoAhgVhMxbCvYkPgqtbYK3TXXcb7TMie0Qjrgwc,9573
|
|
100
102
|
ad_api/api/v1/targets.py,sha256=a4BzPjg9m1JJwqphhpQOFkNIcgCw7v4-K0sNzOihMZI,12355
|
|
101
103
|
ad_api/auth/__init__.py,sha256=B_yKdmsHENQaKfMFAIcSxQqG4aBUmNBm5orKIMUYObk,229
|
|
@@ -113,8 +115,8 @@ ad_api/base/exceptions.py,sha256=9D3M40ZIlLS0fA-aQh1BTWPOW-Nvf0tRhbA85jFnDJ4,438
|
|
|
113
115
|
ad_api/base/helpers.py,sha256=UK7Q13vZ0mNdF54xzfzoGDn2O_cd2yPrK2X4rOzC41c,2334
|
|
114
116
|
ad_api/base/marketplaces.py,sha256=44lvCcluXNpqTprWQ80e3weSQmQbJoWL-WDSOWVbCyQ,4657
|
|
115
117
|
ad_api/base/utils.py,sha256=_qnCBOvyJTLgaZjJzUWTi38GGLHkQszXELs79133Rb4,5618
|
|
116
|
-
python_amazon_ad_api-1.4.
|
|
117
|
-
python_amazon_ad_api-1.4.
|
|
118
|
-
python_amazon_ad_api-1.4.
|
|
119
|
-
python_amazon_ad_api-1.4.
|
|
120
|
-
python_amazon_ad_api-1.4.
|
|
118
|
+
python_amazon_ad_api-1.4.5.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
|
|
119
|
+
python_amazon_ad_api-1.4.5.dist-info/METADATA,sha256=Tldap6NyJK6u13ElZ-2yrjXwXR90wc1WOxoReBf7AhI,22659
|
|
120
|
+
python_amazon_ad_api-1.4.5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
121
|
+
python_amazon_ad_api-1.4.5.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
|
|
122
|
+
python_amazon_ad_api-1.4.5.dist-info/RECORD,,
|
|
File without changes
|
{python_amazon_ad_api-1.4.3.dist-info → python_amazon_ad_api-1.4.5.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|