python-amazon-ad-api 0.5.6__tar.gz → 0.5.8__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.
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/PKG-INFO +4 -4
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/__init__.py +3 -1
- python_amazon_ad_api-0.5.8/ad_api/api/account.py +53 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/__init__.py +2 -0
- python_amazon_ad_api-0.5.8/ad_api/api/sb/benchmarks.py +65 -0
- python_amazon_ad_api-0.5.8/ad_api/version.py +1 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/python_amazon_ad_api.egg-info/PKG-INFO +4 -4
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/python_amazon_ad_api.egg-info/SOURCES.txt +2 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/python_amazon_ad_api.egg-info/requires.txt +2 -2
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/setup.cfg +1 -1
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/setup.py +4 -4
- python-amazon-ad-api-0.5.6/ad_api/version.py +0 -1
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/LICENSE +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/README.md +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/__init__.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/advertising_test_account.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/attribution.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/audiences.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/billing.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/brand_metrics.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/creative_assets.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/dsp/__init__.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/dsp/access_token_client.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/dsp/client.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/dsp/credential_provider.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/dsp/reports.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/eligibility.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/exports.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/history.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/insights.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/invoices.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/localization.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/manager_accounts.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/metadata.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/portfolios.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/profiles.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/reports.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/ad_creatives_v4.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/ad_groups.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/ad_groups_v4.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/ads_v4.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/bid_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/brands.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/campaigns.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/campaigns_v4.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/forecast.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/keywords.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/keywords_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/landing_page_asins.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/media.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/moderation.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/negative_keywords.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/negative_product_targeting.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/product_targeting.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/reports.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/snapshots.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/stores.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/targeting_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/__init__.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/ad_groups.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/bid_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/brand_safety.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/budget_rules.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/campaigns.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/creatives.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/forecast.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/negative_product_targeting.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/product_ads.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/product_targeting.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/reports.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/snapshots.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/targeting_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/__init__.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/ad_groups.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/ad_groups_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/bid_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/budget_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/budget_rules.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaign_negative_keywords.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaign_negative_targets.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaigns.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaigns_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaings_optimization.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/keywords.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/keywords_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/negative_keywords.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/negative_keywords_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/negative_product_targeting.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/product_ads.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/product_ads_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/product_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/product_targeting.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/product_targeting_v3.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/reports.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/snapshots.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/suggested_keywords.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/stores.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/stream.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/validation_configurations.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/auth/__init__.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/auth/access_token_client.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/auth/access_token_response.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/auth/credentials.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/auth/exceptions.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/__init__.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/api_response.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/base_client.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/client.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/config.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/credential_provider.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/exceptions.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/helpers.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/marketplaces.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/utils.py +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/pyproject.toml +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
- {python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/python_amazon_ad_api.egg-info/top_level.txt +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-amazon-ad-api
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.8
|
|
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
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: denisneuf@hotmail.com
|
|
8
8
|
License: MIT
|
|
9
9
|
Project-URL: Bug Tracker, https://github.com/denisneuf/python-amazon-ad-api/issues
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -12,9 +12,9 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: requests<2.
|
|
15
|
+
Requires-Dist: requests<2.33.0,>=2.27.1
|
|
16
16
|
Requires-Dist: six~=1.16.0
|
|
17
|
-
Requires-Dist: cachetools<5.
|
|
17
|
+
Requires-Dist: cachetools<5.6,>=5.0
|
|
18
18
|
Requires-Dist: pycryptodome<3.21,>=3.13
|
|
19
19
|
Requires-Dist: pytz<2025.0,>=2021.3
|
|
20
20
|
Requires-Dist: confuse<2.1,>=1.7
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from .account import Account
|
|
1
2
|
from .profiles import Profiles
|
|
2
3
|
from .manager_accounts import ManagerAccounts
|
|
3
4
|
from .invoices import Invoices
|
|
@@ -50,5 +51,6 @@ __all__ = [
|
|
|
50
51
|
"Recommendations",
|
|
51
52
|
"Stream",
|
|
52
53
|
"Exports",
|
|
53
|
-
"Stores"
|
|
54
|
+
"Stores",
|
|
55
|
+
"Account"
|
|
54
56
|
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Account(Client):
|
|
5
|
+
@sp_endpoint('/adsAccounts/list', method='POST')
|
|
6
|
+
def list_accounts(self, **kwargs) -> ApiResponse:
|
|
7
|
+
r"""
|
|
8
|
+
list_accounts(body: (dict, str)) -> ApiResponse
|
|
9
|
+
|
|
10
|
+
body: | Optional
|
|
11
|
+
| **max_results** (int) Number of records to include in the paginated response. Defaults to max page size for given API. Minimum 10 and a Maximum of 100 [optional]
|
|
12
|
+
| **next_token** (string) Token value allowing to navigate to the next response page. [optional]
|
|
13
|
+
|
|
14
|
+
Returns: List all advertising accounts for the user associated with the access token.
|
|
15
|
+
"""
|
|
16
|
+
schema_version = 'application/vnd.listaccountsresource.v1+json'
|
|
17
|
+
headers = {'Accept': schema_version, 'Content-Type': schema_version}
|
|
18
|
+
|
|
19
|
+
body = Utils.convert_body(kwargs.pop('body'), wrap=False)
|
|
20
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
21
|
+
|
|
22
|
+
@sp_endpoint('/adsAccounts/{}', method='GET')
|
|
23
|
+
def get_account(self, advertisingAccountId: str, **kwargs) -> ApiResponse:
|
|
24
|
+
r"""
|
|
25
|
+
get_account(advertisingAccountId: str) -> ApiResponse
|
|
26
|
+
|
|
27
|
+
Request attributes of a given advertising account.
|
|
28
|
+
|
|
29
|
+
path **advertisingAccountId**:string | Required. This is the global advertising account Id from the client.
|
|
30
|
+
"""
|
|
31
|
+
schema_version = 'application/vnd.listaccountsresource.v1+json'
|
|
32
|
+
headers = {'Accept': schema_version, 'Content-Type': schema_version}
|
|
33
|
+
|
|
34
|
+
return self._request(fill_query_params(kwargs.pop('path'), advertisingAccountId), params=kwargs, headers=headers)
|
|
35
|
+
|
|
36
|
+
@sp_endpoint('/adsAccounts', method='POST')
|
|
37
|
+
def create_account(self, **kwargs) -> ApiResponse:
|
|
38
|
+
r"""
|
|
39
|
+
create_account(body: (dict, str)) -> ApiResponse
|
|
40
|
+
|
|
41
|
+
Create a new advertising account tied to a specific Amazon vendor, seller or author, or to a business who does not sell on Amazon.
|
|
42
|
+
|
|
43
|
+
body: | REQUIRED
|
|
44
|
+
| **associations** (list[dict]) Associations you would like to link to this advertising account, could be Amazon Vendor, Seller, or just a regular business
|
|
45
|
+
| **countryCodes** (list[string]) The countries that you want this account to operate in.
|
|
46
|
+
| **accountName** (string) Account names are typically the name of the company or brand being advertised.
|
|
47
|
+
| **termsToken** (string) An obfuscated identifier of the termsToken, which is activated when an advertisers accepts the Amazon Ads Agreement in relation to the ads account being register.
|
|
48
|
+
"""
|
|
49
|
+
schema_version = 'application/vnd.registeradsaccountresource.v1+json'
|
|
50
|
+
headers = {'Accept': schema_version, 'Content-Type': schema_version}
|
|
51
|
+
|
|
52
|
+
body = Utils.convert_body(kwargs.pop('body'), wrap=False)
|
|
53
|
+
return self._request(kwargs.pop('path'), data=body, params=kwargs, headers=headers)
|
|
@@ -20,6 +20,7 @@ from .stores import Stores
|
|
|
20
20
|
from .media import Media
|
|
21
21
|
from .reports import Reports
|
|
22
22
|
from .snapshots import Snapshots
|
|
23
|
+
from .benchmarks import Benchmarks
|
|
23
24
|
|
|
24
25
|
__all__ = [
|
|
25
26
|
"Brands",
|
|
@@ -44,4 +45,5 @@ __all__ = [
|
|
|
44
45
|
"Media",
|
|
45
46
|
"Reports",
|
|
46
47
|
"Snapshots",
|
|
48
|
+
"Benchmarks"
|
|
47
49
|
]
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from ad_api.base import Client, sp_endpoint, ApiResponse, Utils, fill_query_params
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Benchmarks(Client):
|
|
5
|
+
"""
|
|
6
|
+
Use the Amazon Advertising API for Sponsored Brands for campaign, ad group, keyword, negative keyword, drafts, Stores, landing pages, and Brands management operations. For more information about Sponsored Brands, see the Sponsored Brands Support Center. For onboarding information, see the account setup topic.
|
|
7
|
+
"""
|
|
8
|
+
@sp_endpoint('/benchmarks/brands/{}/categories/{}', method='POST')
|
|
9
|
+
def list_brand_and_category(self, brandName, categoryId, version: int = 1, **kwargs) -> ApiResponse:
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
json_version = 'application/vnd.timeseriesdata.v' + str(version) + "+json"
|
|
13
|
+
|
|
14
|
+
headers = {
|
|
15
|
+
"Accept": json_version,
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return self._request(fill_query_params(kwargs.pop('path'), brandName, categoryId), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
@sp_endpoint('/benchmarks/brands', method='GET')
|
|
22
|
+
def list_brands(self, **kwargs) -> ApiResponse:
|
|
23
|
+
"""
|
|
24
|
+
Gets an array of Brand data objects for the Brand associated with the profile ID passed in the header. For more information about Brands, see [Brand Services](https://brandservices.amazon.com/).
|
|
25
|
+
|
|
26
|
+
Keyword Args
|
|
27
|
+
| None
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
ApiResponse payload:
|
|
31
|
+
|
|
32
|
+
| '**brandId**': *string*, {'description': 'The Brand identifier.'}
|
|
33
|
+
| '**brandEntityId**': *string*, {'description': 'The Brand entity identifier.'}
|
|
34
|
+
| '**brandRegistryName**': *string*, {'description': 'The Brand name.'}
|
|
35
|
+
|
|
36
|
+
"""
|
|
37
|
+
return self._request(kwargs.pop('path'), params=kwargs)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@sp_endpoint('/benchmarks/brandsAndCategories', method='POST')
|
|
41
|
+
def list_brands_and_categories(self, version: int = 1, **kwargs) -> ApiResponse:
|
|
42
|
+
"""
|
|
43
|
+
Creates Sponsored Brands campaigns.
|
|
44
|
+
|
|
45
|
+
Request body (Required)
|
|
46
|
+
Request body
|
|
47
|
+
| **name** (string): [optional] The name of the campaign. This name must be unique to the Amazon Advertising account to which the campaign is associated. Maximum length of the string is 128 characters.
|
|
48
|
+
| **state** (State > string): [optional] Enum: [ enabled, paused, archived ]
|
|
49
|
+
| **portfolio_id** (int) [optional] The identifier of the portfolio to which the campaign is associated.
|
|
50
|
+
| **budget** (float): [optional] The budget amount associated with the campaign.
|
|
51
|
+
| **bid_optimization** (bool) [optional] Set to `true` to allow Amazon to automatically optimize bids for placements below top of search if omitted the server will use the default value of True
|
|
52
|
+
| **bid_multiplier** (float minimum: -99 maximum: 99) [optional] A bid multiplier. Note that this field can only be set when 'bidOptimization' is set to false. Value is a percentage to two decimal places. Example: If set to -40.00 for a $5.00 bid, the resulting bid is $3.00.
|
|
53
|
+
| **end_date** (EndDate > string) [optional] The YYYYMMDD end date of the campaign. Must be greater than the value specified in the startDate field. If this property is not included in the request, the endDate value is not updated. If set to null, endDate is deleted from the draft campaign. [nullable: true] [pattern: ^\\d{8}$]
|
|
54
|
+
|
|
55
|
+
Returns
|
|
56
|
+
ApiResponse
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
json_version = 'application/vnd.reportdata.v' + str(version) + "+json"
|
|
60
|
+
|
|
61
|
+
headers = {
|
|
62
|
+
"Accept": json_version,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.8"
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/python_amazon_ad_api.egg-info/PKG-INFO
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-amazon-ad-api
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.8
|
|
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
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: denisneuf@hotmail.com
|
|
8
8
|
License: MIT
|
|
9
9
|
Project-URL: Bug Tracker, https://github.com/denisneuf/python-amazon-ad-api/issues
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -12,9 +12,9 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: requests<2.
|
|
15
|
+
Requires-Dist: requests<2.33.0,>=2.27.1
|
|
16
16
|
Requires-Dist: six~=1.16.0
|
|
17
|
-
Requires-Dist: cachetools<5.
|
|
17
|
+
Requires-Dist: cachetools<5.6,>=5.0
|
|
18
18
|
Requires-Dist: pycryptodome<3.21,>=3.13
|
|
19
19
|
Requires-Dist: pytz<2025.0,>=2021.3
|
|
20
20
|
Requires-Dist: confuse<2.1,>=1.7
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/python_amazon_ad_api.egg-info/SOURCES.txt
RENAMED
|
@@ -6,6 +6,7 @@ setup.py
|
|
|
6
6
|
ad_api/__init__.py
|
|
7
7
|
ad_api/version.py
|
|
8
8
|
ad_api/api/__init__.py
|
|
9
|
+
ad_api/api/account.py
|
|
9
10
|
ad_api/api/advertising_test_account.py
|
|
10
11
|
ad_api/api/attribution.py
|
|
11
12
|
ad_api/api/audiences.py
|
|
@@ -37,6 +38,7 @@ ad_api/api/sb/ad_creatives_v4.py
|
|
|
37
38
|
ad_api/api/sb/ad_groups.py
|
|
38
39
|
ad_api/api/sb/ad_groups_v4.py
|
|
39
40
|
ad_api/api/sb/ads_v4.py
|
|
41
|
+
ad_api/api/sb/benchmarks.py
|
|
40
42
|
ad_api/api/sb/bid_recommendations.py
|
|
41
43
|
ad_api/api/sb/brands.py
|
|
42
44
|
ad_api/api/sb/campaigns.py
|
|
@@ -2,11 +2,11 @@ from setuptools import setup
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='python-amazon-ad-api',
|
|
5
|
-
version='0.5.
|
|
5
|
+
version='0.5.8',
|
|
6
6
|
install_requires=[
|
|
7
|
-
"requests>=2.27.1,<2.
|
|
7
|
+
"requests>=2.27.1,<2.33.0",
|
|
8
8
|
"six~=1.16.0",
|
|
9
|
-
"cachetools>=5.0,<5.
|
|
9
|
+
"cachetools>=5.0,<5.6",
|
|
10
10
|
"pycryptodome>=3.13,<3.21",
|
|
11
11
|
"pytz>=2021.3,<2025.0",
|
|
12
12
|
"confuse>=1.7,<2.1",
|
|
@@ -24,6 +24,6 @@ setup(
|
|
|
24
24
|
url='https://github.com/denisneuf/python-amazon-ad-api',
|
|
25
25
|
license='MIT',
|
|
26
26
|
author='Daniel Alvaro',
|
|
27
|
-
author_email='
|
|
27
|
+
author_email='denisneuf@hotmail.com',
|
|
28
28
|
description='Python wrapper for the Amazon Advertising API',
|
|
29
29
|
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.5.6"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/advertising_test_account.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/dsp/access_token_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/dsp/credential_provider.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/bid_recommendations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/keywords_recommendations.py
RENAMED
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/landing_page_asins.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/negative_keywords.py
RENAMED
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/product_targeting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sb/targeting_recommendations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/bid_recommendations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/campaigns_budget_usage.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/product_targeting.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sd/targeting_recommendations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/bid_recommendations.py
RENAMED
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/bid_recommendations_v3.py
RENAMED
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/budget_recommendations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaign_negative_targets.py
RENAMED
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaigns_budget_usage.py
RENAMED
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/campaings_optimization.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/negative_keywords.py
RENAMED
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/negative_keywords_v3.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/product_recommendations.py
RENAMED
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/product_targeting.py
RENAMED
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/product_targeting_v3.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/sp/suggested_keywords.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/api/validation_configurations.py
RENAMED
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/auth/access_token_client.py
RENAMED
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/auth/access_token_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python-amazon-ad-api-0.5.6 → python_amazon_ad_api-0.5.8}/ad_api/base/credential_provider.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|