python-amazon-ad-api 1.1.9__tar.gz → 1.2.0__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.
Files changed (123) hide show
  1. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/PKG-INFO +1 -1
  2. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/audiences.py +6 -13
  3. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/ad_groups_v4.py +7 -4
  4. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/ads_v4.py +64 -64
  5. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/migration.py +3 -2
  6. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/stores.py +10 -7
  7. python_amazon_ad_api-1.2.0/ad_api/api/sp/campaign_negative_targets.py +122 -0
  8. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/product_ads_v3.py +6 -4
  9. python_amazon_ad_api-1.2.0/ad_api/version.py +1 -0
  10. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/python_amazon_ad_api.egg-info/PKG-INFO +1 -1
  11. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/setup.cfg +1 -1
  12. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/setup.py +1 -1
  13. python_amazon_ad_api-1.1.9/ad_api/api/sp/campaign_negative_targets.py +0 -143
  14. python_amazon_ad_api-1.1.9/ad_api/version.py +0 -1
  15. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/LICENSE +0 -0
  16. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/README.md +0 -0
  17. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/__init__.py +0 -0
  18. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/__init__.py +0 -0
  19. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/account.py +0 -0
  20. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/advertising_test_account.py +0 -0
  21. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/attribution.py +0 -0
  22. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/billing.py +0 -0
  23. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/brand_metrics.py +0 -0
  24. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/creative_assets.py +0 -0
  25. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/eligibility.py +0 -0
  26. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/exports.py +0 -0
  27. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/history.py +0 -0
  28. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/insights.py +0 -0
  29. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/invoices.py +0 -0
  30. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/localization.py +0 -0
  31. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/manager_accounts.py +0 -0
  32. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/metadata.py +0 -0
  33. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/portfolios.py +0 -0
  34. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/portfolios_v3.py +0 -0
  35. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/profiles.py +0 -0
  36. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/recommendations.py +0 -0
  37. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/reports.py +0 -0
  38. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/__init__.py +0 -0
  39. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/ad_creatives_v4.py +0 -0
  40. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/ad_groups.py +0 -0
  41. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/benchmarks.py +0 -0
  42. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/bid_recommendations.py +0 -0
  43. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/brands.py +0 -0
  44. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/budget_rules.py +0 -0
  45. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/campaigns.py +0 -0
  46. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/campaigns_v4.py +0 -0
  47. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/forecast.py +0 -0
  48. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/keywords.py +0 -0
  49. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/keywords_recommendations.py +0 -0
  50. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/landing_page_asins.py +0 -0
  51. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/media.py +0 -0
  52. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/negative_keywords.py +0 -0
  53. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/negative_product_targeting.py +0 -0
  54. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/optimization_rules.py +0 -0
  55. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/product_targeting.py +0 -0
  56. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/recommendations.py +0 -0
  57. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/reports.py +0 -0
  58. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/targeting_categories.py +0 -0
  59. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/targeting_recommendations.py +0 -0
  60. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sb/themes.py +0 -0
  61. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/__init__.py +0 -0
  62. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/ad_groups.py +0 -0
  63. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/bid_recommendations.py +0 -0
  64. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/brand_safety.py +0 -0
  65. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/budget_rules.py +0 -0
  66. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/campaigns.py +0 -0
  67. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/campaigns_budget_usage.py +0 -0
  68. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/creatives.py +0 -0
  69. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/forecast.py +0 -0
  70. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/negative_product_targeting.py +0 -0
  71. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/product_ads.py +0 -0
  72. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/product_targeting.py +0 -0
  73. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/recommendations.py +0 -0
  74. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/reports.py +0 -0
  75. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/snapshots.py +0 -0
  76. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sd/targeting_recommendations.py +0 -0
  77. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/__init__.py +0 -0
  78. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/ad_groups_v3.py +0 -0
  79. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/bid_recommendations_v3.py +0 -0
  80. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/budget_initial_recommendation.py +0 -0
  81. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/budget_recommendations.py +0 -0
  82. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/budget_rules.py +0 -0
  83. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/budget_rules_recommendations.py +0 -0
  84. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/campaign_consolidated_recommendations.py +0 -0
  85. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/campaign_negative_keywords_v3.py +0 -0
  86. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/campaigns_budget_usage.py +0 -0
  87. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/campaigns_v3.py +0 -0
  88. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/campaings_optimization.py +0 -0
  89. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/keywords_v3.py +0 -0
  90. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/negative_keywords_v3.py +0 -0
  91. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/negative_product_targeting_v3.py +0 -0
  92. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/product_recommendations.py +0 -0
  93. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/product_targeting_v3.py +0 -0
  94. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/ranked_keywords_recommendations.py +0 -0
  95. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/sp/schedule_based_bid_optimization.py +0 -0
  96. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/stores.py +0 -0
  97. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/stream.py +0 -0
  98. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/v1/__init__.py +0 -0
  99. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/v1/ad_groups.py +0 -0
  100. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/v1/ads.py +0 -0
  101. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/v1/campaigns.py +0 -0
  102. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/v1/targets.py +0 -0
  103. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/api/validation_configurations.py +0 -0
  104. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/auth/__init__.py +0 -0
  105. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/auth/access_token_client.py +0 -0
  106. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/auth/access_token_response.py +0 -0
  107. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/auth/credentials.py +0 -0
  108. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/auth/exceptions.py +0 -0
  109. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/__init__.py +0 -0
  110. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/api_response.py +0 -0
  111. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/base_client.py +0 -0
  112. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/client.py +0 -0
  113. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/config.py +0 -0
  114. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/credential_provider.py +0 -0
  115. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/exceptions.py +0 -0
  116. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/helpers.py +0 -0
  117. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/marketplaces.py +0 -0
  118. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/ad_api/base/utils.py +0 -0
  119. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/pyproject.toml +0 -0
  120. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/python_amazon_ad_api.egg-info/SOURCES.txt +0 -0
  121. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/python_amazon_ad_api.egg-info/dependency_links.txt +0 -0
  122. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/python_amazon_ad_api.egg-info/requires.txt +0 -0
  123. {python_amazon_ad_api-1.1.9 → python_amazon_ad_api-1.2.0}/python_amazon_ad_api.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 1.1.9
3
+ Version: 1.2.0
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,8 +7,6 @@ class Audiences(Client):
7
7
  @sp_endpoint('/audiences/taxonomy/list', method='POST')
8
8
  def list_audiences_taxonomy(self, **kwargs) -> ApiResponse:
9
9
  r"""
10
- list_audiences_taxonomy(body: dict or str, **kwargs) -> ApiResponse:
11
-
12
10
  Returns a list of audience categories for a given category path
13
11
 
14
12
  Requires one of these permissions: ["advertiser_campaign_edit","advertiser_campaign_view"]
@@ -22,18 +20,15 @@ class Audiences(Client):
22
20
  **maxResults**: *integer* (query) Sets the maximum number of categories in the returned array. Use in conjunction with the nextToken parameter to control pagination. For example, supplying maxResults=20 with a previously returned token will fetch up to the next 20 items. In some cases, fewer items may be returned. Default value : 250
23
21
 
24
22
  **body**: *dict or str* (data) REQUIRED
25
- {
26
-
27
- "adType": **string** Enum [ DSP, SD ]
28
23
 
29
- "categoryPath":
30
-
31
- [
32
-
33
- **string**
24
+ .. code-block:: json
34
25
 
26
+ {
27
+ "adType": "DSP",
28
+ "categoryPath": [
29
+ "string"
35
30
  ]
36
- }
31
+ }
37
32
 
38
33
  Returns ApiResponse
39
34
 
@@ -44,8 +39,6 @@ class Audiences(Client):
44
39
  @sp_endpoint('/audiences/list', method='POST')
45
40
  def list_audiences(self, **kwargs) -> ApiResponse:
46
41
  r"""
47
- list_audiences(body: dict or str, **kwargs) -> ApiResponse:
48
-
49
42
  Returns a list of audience segments for an advertiser. The result set can be filtered by providing an array of Filter objects. Each item in the resulting set will match all specified filters.
50
43
 
51
44
  Requires one of these permissions: ["advertiser_campaign_edit","advertiser_campaign_view"]
@@ -31,10 +31,13 @@ class AdGroupsV4(Client):
31
31
  """
32
32
  Update Sponsored Brand Ad groups.
33
33
 
34
- Request Body
35
- | campaignId (string) : The identifier of the campaign to which the keyword is associated. [optional]
36
- | name (string) : The name of the ad group. [optional]
37
- | state (CreateOrUpdateEntityState > string) : Entity state for create or update operation. Enum : [ENABLED, PAUSED]
34
+ Request Body
35
+
36
+ - ``campaignId`` (string) : The identifier of the campaign to which the
37
+ keyword is associated. [optional]
38
+ - ``name`` (string) : The name of the ad group. [optional]
39
+ - ``state`` (CreateOrUpdateEntityState > string) : Entity state for
40
+ create or update operation. Enum : [ENABLED, PAUSED]
38
41
 
39
42
  Returns
40
43
  ApiResponse
@@ -8,13 +8,13 @@ class AdsV4(Client):
8
8
  Lists all Sponsored Brands ads.
9
9
 
10
10
  Request Body (optional)
11
- | **campaignIdFilter** (dict) : Filter entities by the list of objectIds.
12
- | **stateFilter** (dict) : Filter entities by state.
13
- | **maxResults** (int) : Number of records to include in the paginated response. Defaults to max page size for given API.
14
- | **nextToken** (string) : Token value allowing to navigate to the next response page.
15
- | **adIdFilter** (dict) : Filter entities by the list of objectIds.
16
- | **adGroupIdFilter** (dict) : Filter entities by the list of objectIds.
17
- | **nameFilter** (dict) : Filter entities by name.
11
+ | **campaignIdFilter** (dict) : Filter entities by the list of objectIds.
12
+ | **stateFilter** (dict) : Filter entities by state.
13
+ | **maxResults** (int) : Number of records to include in the paginated response. Defaults to max page size for given API.
14
+ | **nextToken** (string) : Token value allowing to navigate to the next response page.
15
+ | **adIdFilter** (dict) : Filter entities by the list of objectIds.
16
+ | **adGroupIdFilter** (dict) : Filter entities by the list of objectIds.
17
+ | **nameFilter** (dict) : Filter entities by name.
18
18
 
19
19
 
20
20
  Returns
@@ -33,13 +33,13 @@ class AdsV4(Client):
33
33
  Creates Sponsored Brand video ads.
34
34
 
35
35
  Request Body (required)
36
- | **ads** ([{}]) :
37
- **name** (string) : The name of the ad
38
- **state** (CreateOrUpdateEntityState > String) Entity state for create or update operation. Enum : [ENABLED, PAUSED]
39
- **adGroupId** (string) : The adGroup identifier.
40
- **creative** (dict) :
41
- asins ([string]) [optional]
42
- videoAssetIds ([string]) [optional]
36
+ | **ads** ([{}]) :
37
+ **name** (string) : The name of the ad
38
+ **state** (CreateOrUpdateEntityState > String) Entity state for create or update operation. Enum : [ENABLED, PAUSED]
39
+ **adGroupId** (string) : The adGroup identifier.
40
+ **creative** (dict) :
41
+ asins ([string]) [optional]
42
+ videoAssetIds ([string]) [optional]
43
43
 
44
44
  Returns
45
45
  ApiResponse
@@ -57,21 +57,21 @@ class AdsV4(Client):
57
57
  Creates Sponsored Brands product collection ads.
58
58
 
59
59
  Request Body (required)
60
- | **ads** ([{}]) :
61
- **landingPage** (dict) :
62
- asins [string] [optional]
63
- pageType (LadingPageType > String ) : The type of landing page, such as store page, product list (simple landing page), custom url. [optional]
64
- url (string) : URL of an existing simple landing page or Store page. [optional]
65
- **name** (string) : The name of the ad
66
- **state** (CreateOrUpdateEntityState > String) Entity state for create or update operation. Enum : [ENABLED, PAUSED]
67
- **adGroupId** (string) : The adGroup identifier.
68
- **creative** (dict) :
69
- brandLogoCrop (string) [optional]
70
- brandName (string) [optional]
71
- customImageAssetId (string)
72
- customImageCrop ({int}) [optional]
73
- brandLogoAssetID (string) [optional]
74
- headline (string) The headline text [optional]
60
+ | **ads** ([{}]) :
61
+ **landingPage** (dict) :
62
+ asins [string] [optional]
63
+ pageType (LadingPageType > String ) : The type of landing page, such as store page, product list (simple landing page), custom url. [optional]
64
+ url (string) : URL of an existing simple landing page or Store page. [optional]
65
+ **name** (string) : The name of the ad
66
+ **state** (CreateOrUpdateEntityState > String) Entity state for create or update operation. Enum : [ENABLED, PAUSED]
67
+ **adGroupId** (string) : The adGroup identifier.
68
+ **creative** (dict) :
69
+ brandLogoCrop (string) [optional]
70
+ brandName (string) [optional]
71
+ customImageAssetId (string)
72
+ customImageCrop ({int}) [optional]
73
+ brandLogoAssetID (string) [optional]
74
+ headline (string) The headline text [optional]
75
75
 
76
76
  Returns
77
77
  ApiResponse
@@ -89,21 +89,21 @@ class AdsV4(Client):
89
89
  Creates Sponsored Brands brand video ads.
90
90
 
91
91
  Request Body (required)
92
- | **ads** ([{}]) :
93
- **landingPage** (dict) :
94
- asins [string] [optional]
95
- pageType (LadingPageType > String ) : The type of landing page, such as store page, product list (simple landing page), custom url. [optional]
96
- url (string) : URL of an existing simple landing page or Store page. [optional]
97
- **name** (string) : The name of the ad
98
- **state** (CreateOrUpdateEntityState > String) Entity state for create or update operation. Enum : [ENABLED, PAUSED]
99
- **adGroupId** (string) : The adGroup identifier.
100
- **creative** (dict) :
101
- asins ([string])
102
- brandName (string) [optional]
103
- brandLogoCrop ({}) [optional]
104
- videoAssetIds ([string]) [optional]
105
- brandLogoAssetID (string) [optional]
106
- headline (string) The headline text [optional]
92
+ | **ads** ([{}]) :
93
+ **landingPage** (dict) :
94
+ asins [string] [optional]
95
+ pageType (LadingPageType > String ) : The type of landing page, such as store page, product list (simple landing page), custom url. [optional]
96
+ url (string) : URL of an existing simple landing page or Store page. [optional]
97
+ **name** (string) : The name of the ad
98
+ **state** (CreateOrUpdateEntityState > String) Entity state for create or update operation. Enum : [ENABLED, PAUSED]
99
+ **adGroupId** (string) : The adGroup identifier.
100
+ **creative** (dict) :
101
+ asins ([string])
102
+ brandName (string) [optional]
103
+ brandLogoCrop ({}) [optional]
104
+ videoAssetIds ([string]) [optional]
105
+ brandLogoAssetID (string) [optional]
106
+ headline (string) The headline text [optional]
107
107
 
108
108
  Returns
109
109
  ApiResponse
@@ -120,20 +120,20 @@ class AdsV4(Client):
120
120
  Creates Sponsored Brands store spotlight ads.
121
121
 
122
122
  Request Body (required)
123
- | **ads** ([{}]) :
124
- **landingPage** (dict) :
125
- asins [string] [optional]
126
- pageType (LadingPageType > String ) : The type of landing page, such as store page, product list (simple landing page), custom url. [optional]
127
- url (string) : URL of an existing simple landing page or Store page. [optional]
128
- **name** (string) : The name of the ad
129
- **state** (CreateOrUpdateEntityState > String) Entity state for create or update operation. Enum : [ENABLED, PAUSED]
130
- **adGroupId** (string) : The adGroup identifier.
131
- **creative** (dict) :
132
- brandLogoCrop (string) [optional]
133
- brandName (string) [optional]
134
- subpages (string) [optional]
135
- brandLogoAssetID (string) [optional]
136
- headline (string) The headline text [optional]
123
+ | **ads** ([{}]) :
124
+ **landingPage** (dict) :
125
+ asins [string] [optional]
126
+ pageType (LadingPageType > String ) : The type of landing page, such as store page, product list (simple landing page), custom url. [optional]
127
+ url (string) : URL of an existing simple landing page or Store page. [optional]
128
+ **name** (string) : The name of the ad
129
+ **state** (CreateOrUpdateEntityState > String) Entity state for create or update operation. Enum : [ENABLED, PAUSED]
130
+ **adGroupId** (string) : The adGroup identifier.
131
+ **creative** (dict) :
132
+ brandLogoCrop (string) [optional]
133
+ brandName (string) [optional]
134
+ subpages (string) [optional]
135
+ brandLogoAssetID (string) [optional]
136
+ headline (string) The headline text [optional]
137
137
 
138
138
  Returns
139
139
  ApiResponse
@@ -150,10 +150,10 @@ class AdsV4(Client):
150
150
  Updates the Sponsored Brands ads.
151
151
 
152
152
  Request Body (required)
153
- | **ads** ([{}]) :
154
- **adsId** (string) [required] : The product ad identifier.
155
- name (string) [optional] : The name of the ad
156
- state (State>String) [optional] : Entity state for create or update operation. Enum : [ENABLED, PAUSED]
153
+ | **ads** ([{}]) :
154
+ **adsId** (string) [required] : The product ad identifier.
155
+ name (string) [optional] : The name of the ad
156
+ state (State>String) [optional] : Entity state for create or update operation. Enum : [ENABLED, PAUSED]
157
157
 
158
158
  Returns
159
159
  ApiResponse
@@ -250,8 +250,8 @@ class AdsV4(Client):
250
250
  Deletes Sponsored Brands ads.
251
251
 
252
252
  Request Body
253
- | **adIdFilter** (dict) : Filter entities by the list of objectIds.
254
- include : list of adIds as string
253
+ | **adIdFilter** (dict) : Filter entities by the list of objectIds.
254
+ include : list of adIds as string
255
255
 
256
256
  """
257
257
 
@@ -113,10 +113,11 @@ class Migration(Client):
113
113
  Lists every campaign migration result for the advertiser.
114
114
 
115
115
  Request Body [Optional]
116
- | **nextToken** (string): [optional]
116
+
117
+ - ``nextToken`` (string): [optional]
117
118
 
118
119
  Returns:
119
- | ApiResponse, ``200``. With nothing migrated yet the service answers
120
+ ApiResponse, ``200``. With nothing migrated yet the service answers
120
121
  an empty object rather than a list, so do not assume a ``migrations``
121
122
  key is always present.
122
123
  """
@@ -34,15 +34,18 @@ class Stores(Client):
34
34
 
35
35
  The endpoint takes ``multipart/form-data`` with two parts, not JSON:
36
36
 
37
- ``assetInfo`` A JSON string with ``brandEntityId`` and ``mediaType``.
38
- ``asset`` The image bytes. PNG, JPEG or GIF, under 1MB and at
39
- least 400x400 pixels.
37
+ * ``assetInfo`` A JSON string with ``brandEntityId`` and ``mediaType``.
38
+ * ``asset`` The image bytes. PNG, JPEG or GIF, under 1MB and at
39
+ least 400x400 pixels.
40
40
 
41
41
  Keyword Args
42
- | path **image** (str or bytes): A file path, or the raw image bytes. [required]
43
- | path **brandEntityId** (string): The Brand entity identifier. Required for sellers, optional for vendors. [required]
44
- | path **mediaType** (string): Only ``brandLogo`` is supported. [optional]
45
- | path **filename** (string): Name sent in ``Content-Disposition``. Taken from the path when a path is given. [optional]
42
+
43
+ - ``image`` (str or bytes): A file path, or the raw image bytes. [required]
44
+ - ``brandEntityId`` (string): The Brand entity identifier. Required for
45
+ sellers, optional for vendors. [required]
46
+ - ``mediaType`` (string): Only ``brandLogo`` is supported. [optional]
47
+ - ``filename`` (string): Name sent in ``Content-Disposition``. Taken
48
+ from the path when a path is given. [optional]
46
49
 
47
50
  Returns:
48
51
  | ApiResponse
@@ -0,0 +1,122 @@
1
+ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
+
3
+
4
+ class CampaignNegativeTargets(Client):
5
+ @sp_endpoint('/sp/campaignNegativeTargets/delete', method='POST')
6
+ def delete_campaign_negative_targets(self, version: int = 3, **kwargs) -> ApiResponse:
7
+ r"""
8
+ Deleting campaign negative targets.
9
+
10
+ Request Body (required)
11
+ | SponsoredProductsDeleteSponsoredProductsCampaignNegativeTargetingClausesRequestContent {
12
+ | campaignNegativeTargetIdFilter* SponsoredProductsObjectIdFilter {
13
+ | Filter entities by the list of objectIds
14
+ | **include**\* (array) minItems: 0 maxItems: 1000 [
15
+ | string entity object identifier
16
+ | ]
17
+ | }
18
+ | }
19
+
20
+ Returns
21
+ ApiResponse
22
+ """
23
+ json_version = 'application/vnd.spcampaignNegativeTargetingClause.v' + str(version) + "+json"
24
+ headers = {"Accept": json_version, "Content-Type": json_version}
25
+
26
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
27
+
28
+ @sp_endpoint('/sp/campaignNegativeTargets', method='POST')
29
+ def create_campaign_negative_targets(self, version: int = 3, prefer: bool = False, **kwargs) -> ApiResponse:
30
+ r"""
31
+ Create campaign negative targets.
32
+
33
+ Keyword Args
34
+
35
+ - ``prefer`` (bool): send ``Prefer: return=representation`` so create and
36
+ update return the full object rather than only the ids. [optional]
37
+
38
+ Request Body (required)
39
+
40
+ - ``campaignNegativeTargetingClauses`` (array): the clauses to create.
41
+
42
+ Each clause carries:
43
+
44
+ - ``campaignId`` (string): the campaign the target belongs to.
45
+ - ``state`` (string): ``ENABLED`` or ``PAUSED``.
46
+ - ``expression`` (array): one predicate with ``type`` and ``value``.
47
+ ``type`` is ``ASIN_BRAND_SAME_AS`` or ``ASIN_SAME_AS``.
48
+
49
+ Returns
50
+ ApiResponse
51
+ """
52
+ json_version = 'application/vnd.spCampaignNegativeTargetingClause.v' + str(version) + "+json"
53
+ headers = {"Accept": json_version, "Content-Type": json_version}
54
+ prefer_value = 'return=representation'
55
+ if prefer:
56
+ headers.update({"Prefer": prefer_value})
57
+
58
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
59
+
60
+ @sp_endpoint('/sp/campaignNegativeTargets', method='PUT')
61
+ def edit_negative_product_targets(self, version: int = 3, prefer: bool = False, **kwargs) -> ApiResponse:
62
+ r"""
63
+ Update campaign negative targets.
64
+
65
+ Keyword Args
66
+
67
+ - ``prefer`` (bool): send ``Prefer: return=representation`` so create and
68
+ update return the full object rather than only the ids. [optional]
69
+
70
+ Request Body (required)
71
+
72
+ - ``campaignNegativeTargetingClauses`` (array): the clauses to update.
73
+
74
+ Each clause carries:
75
+
76
+ - ``targetId`` (string): the target to update.
77
+ - ``state`` (string): ``ENABLED`` or ``PAUSED``.
78
+ - ``expression`` (array): one predicate with ``type`` and ``value``.
79
+ ``type`` is ``ASIN_BRAND_SAME_AS`` or ``ASIN_SAME_AS``.
80
+
81
+ Returns
82
+ ApiResponse
83
+ """
84
+ json_version = 'application/vnd.spCampaignNegativeTargetingClause.v' + str(version) + "+json"
85
+ headers = {"Accept": json_version, "Content-Type": json_version}
86
+
87
+ prefer_value = 'return=representation'
88
+ if prefer:
89
+ headers.update({"Prefer": prefer_value})
90
+
91
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
92
+
93
+ @sp_endpoint('/sp/campaignNegativeTargets/list', method='POST')
94
+ def list_campaign_negative_targets(self, version: int = 3, **kwargs) -> ApiResponse:
95
+ r"""
96
+ List campaign negative targets.
97
+
98
+ Request Body (optional)
99
+
100
+ - ``campaignIdFilter`` (object): narrow to those campaigns. Carries
101
+ ``include``, a list of campaign ids.
102
+ - ``campaignNegativeTargetIdFilter`` (object): narrow to those targets.
103
+ Carries ``include``, a list of target ids.
104
+ - ``stateFilter`` (object): narrow by state. Carries ``include``, a list
105
+ drawn from ``ENABLED``, ``PAUSED``, ``ARCHIVED``, ``ENABLING``,
106
+ ``USER_DELETED`` and ``OTHER``.
107
+ - ``asinFilter`` (object): narrow by ASIN. Carries ``include``, a list of
108
+ ASINs, and ``queryTermMatchType``, either ``BROAD_MATCH`` or
109
+ ``EXACT_MATCH``.
110
+ - ``maxResults`` (integer): page size. Defaults to the API maximum.
111
+ - ``nextToken`` (string): pagination token.
112
+ - ``includeExtendedDataFields`` (boolean): also return ``creationDate``,
113
+ ``lastUpdateDate`` and ``servingStatus``.
114
+
115
+ Returns
116
+ ApiResponse
117
+ """
118
+ content_type = 'application/vnd.spcampaignNegativeTargetingClause.v' + str(version) + '+json'
119
+ accept = 'application/vnd.spCampaignNegativeTargetingClause.v' + str(version) + '+json'
120
+ headers = {"Accept": accept, "Content-Type": content_type}
121
+
122
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -95,10 +95,12 @@ class ProductAdsV3(Client):
95
95
  r"""
96
96
  Delete one or multiple sponsored product ads.
97
97
 
98
- Request Body (required) : a dictionary to filter with ad ids that should be deleted. Sets the state of a
99
- specified product ad to archived
100
- | **adIdFilter** ({})
101
- | include [string] : string list of ad object identifier.
98
+ Request Body (required): a dictionary to filter with ad ids that should
99
+ be deleted. Sets the state of a specified product ad to archived.
100
+
101
+ **adIdFilter** ({})
102
+
103
+ - ``include`` [string] : string list of ad object identifier.
102
104
 
103
105
  Returns
104
106
  | ApiResponse
@@ -0,0 +1 @@
1
+ __version__ = "1.2.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 1.1.9
3
+ Version: 1.2.0
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
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = python-amazon-ad-api
3
- version = 1.1.9
3
+ version = 1.2.0
4
4
  author = Daniel Alvaro
5
5
  author_email = denisneuf@hotmail.com
6
6
  description = Python wrapper for the Amazon Advertising API
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='python-amazon-ad-api',
5
- version='1.1.9',
5
+ version='1.2.0',
6
6
  install_requires=[
7
7
  "requests>=2.27.1,<2.35.0",
8
8
  "six>=1.16,<1.18",
@@ -1,143 +0,0 @@
1
- from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
-
3
-
4
- class CampaignNegativeTargets(Client):
5
- @sp_endpoint('/sp/campaignNegativeTargets/delete', method='POST')
6
- def delete_campaign_negative_targets(self, version: int = 3, **kwargs) -> ApiResponse:
7
- r"""
8
- Deleting campaign negative targets.
9
-
10
- Request Body (required)
11
- | SponsoredProductsDeleteSponsoredProductsCampaignNegativeTargetingClausesRequestContent {
12
- | campaignNegativeTargetIdFilter* SponsoredProductsObjectIdFilter {
13
- | Filter entities by the list of objectIds
14
- | **include**\* (array) minItems: 0 maxItems: 1000 [
15
- | string entity object identifier
16
- | ]
17
- | }
18
- | }
19
-
20
- Returns
21
- ApiResponse
22
- """
23
- json_version = 'application/vnd.spcampaignNegativeTargetingClause.v' + str(version) + "+json"
24
- headers = {"Accept": json_version, "Content-Type": json_version}
25
-
26
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
27
-
28
- @sp_endpoint('/sp/campaignNegativeTargets', method='POST')
29
- def create_campaign_negative_targets(self, version: int = 3, prefer: bool = False, **kwargs) -> ApiResponse:
30
- r"""
31
- Create campaign negative targets.
32
-
33
- Param:
34
-
35
- | header **Prefer**\* (string). The "Prefer" header, as defined in [RFC7240], allows clients to request certain behavior from the service. The service ignores preference values that are either not supported or not known by the service. Either multiple Prefer headers are passed or single one with comma separated values, both forms are equivalent Supported preferences: return=representation - return the full object when doing create/update/delete operations instead of ids
36
-
37
- Request Body (required)
38
- | SponsoredProductsCreateSponsoredProductsCampaignNegativeTargetingClausesRequestContent {
39
- | **campaignNegativeTargetingClauses**\* SponsoredProductsCreateCampaignNegativeTargetingClause {
40
- | **expression**\* (array) The NegativeTargeting expression. minItems: 0 maxItems: 1000 [
41
- | SponsoredProductsCreateOrUpdateNegativeTargetingExpressionPredicate {
42
- | **type**\* (string) SponsoredProductsCreateOrUpdateNegativeTargetingExpressionPredicateType. The type of negative targeting expression. Enum: ['ASIN_BRAND_SAME_AS', 'ASIN_SAME_AS'].
43
- | **value** (string): The expression value
44
- | }
45
- | ]
46
- | **campaignId**\* (string) The identifier of the campaign to which this target is associated.
47
- | **state**\* (string) SponsoredProductsCreateOrUpdateEntityState. Entity state for create or update operation. Enum: [ ENABLED, PAUSED ]
48
- | }
49
- | }
50
- Request Body (optional)
51
-
52
- Returns
53
- ApiResponse
54
- """
55
- json_version = 'application/vnd.spCampaignNegativeTargetingClause.v' + str(version) + "+json"
56
- headers = {"Accept": json_version, "Content-Type": json_version}
57
- prefer_value = 'return=representation'
58
- if prefer:
59
- headers.update({"Prefer": prefer_value})
60
-
61
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
62
-
63
- @sp_endpoint('/sp/campaignNegativeTargets', method='PUT')
64
- def edit_negative_product_targets(self, version: int = 3, prefer: bool = False, **kwargs) -> ApiResponse:
65
- r"""
66
- Update campaign negative targets.
67
-
68
- Param:
69
-
70
- | header **Prefer**\* (string). The "Prefer" header, as defined in [RFC7240], allows clients to request certain behavior from the service. The service ignores preference values that are either not supported or not known by the service. Either multiple Prefer headers are passed or single one with comma separated values, both forms are equivalent Supported preferences: return=representation - return the full object when doing create/update/delete operations instead of ids
71
-
72
- Request Body (required)
73
- | SponsoredProductsUpdateSponsoredProductsCampaignNegativeTargetingClausesRequestContent {
74
- | **campaignNegativeTargetingClauses**\* SponsoredProductsUpdateCampaignNegativeTargetingClause {
75
- | **expression**\* (array) The NegativeTargeting expression. minItems: 0 maxItems: 1000 [
76
- | SponsoredProductsCreateOrUpdateNegativeTargetingExpressionPredicate {
77
- | **type**\* (string) SponsoredProductsCreateOrUpdateNegativeTargetingExpressionPredicateType. The type of negative targeting expression. Enum: ['ASIN_BRAND_SAME_AS', 'ASIN_SAME_AS'].
78
- | **value** (string): The expression value
79
- | }
80
- | ]
81
- | **targetId**\* (string) The target identifier
82
- | **state**\* (string) SponsoredProductsCreateOrUpdateEntityState. Entity state for create or update operation. Enum: [ ENABLED, PAUSED ]
83
- | }
84
- | }
85
- Request Body (optional)
86
-
87
- Returns
88
- ApiResponse
89
- """
90
- json_version = 'application/vnd.spCampaignNegativeTargetingClause.v' + str(version) + "+json"
91
- headers = {"Accept": json_version, "Content-Type": json_version}
92
-
93
- prefer_value = 'return=representation'
94
- if prefer:
95
- headers.update({"Prefer": prefer_value})
96
-
97
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
98
-
99
- @sp_endpoint('/sp/campaignNegativeTargets/list', method='POST')
100
- def list_campaign_negative_targets(self, version: int = 3, **kwargs) -> ApiResponse:
101
- r"""
102
- List campaign negative targets.
103
-
104
- Request Body (required)
105
- | SponsoredProductsListSponsoredProductsCampaignNegativeTargetingClausesRequestContent {
106
- | **campaignIdFilter** SponsoredProductsReducedObjectIdFilter {
107
- | Filter entities by the list of objectIds
108
- | **include**\* (array) minItems: 0 maxItems: 100 [
109
- | string entity object identifier
110
- | ]
111
- | }
112
- | **campaignNegativeTargetIdFilter** SponsoredProductsObjectIdFilter {
113
- | Filter entities by the list of objectIds
114
- | **include**\* (array) minItems: 0 maxItems: 1000 [
115
- | string entity object identifier
116
- | ]
117
- | }
118
- | **stateFilter** SponsoredProductsEntityStateFilter {
119
- | Filter entities by state
120
- | **include**\* (array) minItems: 0 maxItems: 10 [
121
- | SponsoredProductsEntityState (string) The current resource state. Enum: [ ENABLED, PAUSED, ARCHIVED, ENABLING, USER_DELETED, OTHER ]
122
- | ]
123
- | }
124
- | **maxResults** integer($int32) Number of records to include in the paginated response. Defaults to max page size for given API
125
- | **nextToken** (string) token value allowing to navigate to the next response page
126
- | **asinFilter** SponsoredProductsAsinFilter {
127
- | **queryTermMatchType** SponsoredProductsQueryTermMatchType (string): Match type for query filters. Enum: [ BROAD_MATCH, EXACT_MATCH ]
128
- | **include** (array) maxItems: 100 [
129
- | string
130
- | ]
131
- | }
132
- | **includeExtendedDataFields** (boolean) Whether to get entity with extended data fields such as creationDate, lastUpdateDate, servingStatus
133
- | }
134
- Request Body (optional)
135
-
136
- Returns
137
- ApiResponse
138
- """
139
- content_type = 'application/vnd.spcampaignNegativeTargetingClause.v' + str(version) + '+json'
140
- accept = 'application/vnd.spCampaignNegativeTargetingClause.v' + str(version) + '+json'
141
- headers = {"Accept": accept, "Content-Type": content_type}
142
-
143
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
@@ -1 +0,0 @@
1
- __version__ = "1.1.9"