python-amazon-ad-api 1.1.6__py3-none-any.whl → 1.1.7__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.
@@ -128,6 +128,92 @@ class AdCreativesV4(Client):
128
128
 
129
129
  return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
130
130
 
131
+ @sp_endpoint('/sb/ads/creatives/autoCollection', method='POST')
132
+ def create_auto_collection_ad_creative(self, version: int = 4, **kwargs) -> ApiResponse:
133
+ """
134
+ Creates a new version of an auto collection creative for an existing ad.
135
+
136
+ Request Body [Required]
137
+ | **ads** (array): [required] One entry per ad.
138
+ | **adId** (string): [required] Sponsored Brands ad identifier.
139
+ | **creative** ({}): [required]
140
+ | **brandName** (string): [required]
141
+ | **brandLogoAssetID** (string): [optional]
142
+ | **brandLogoCrop** ({}): [optional] ``top``, ``left``,
143
+ ``width`` and ``height``.
144
+ | **asinExclusions** (array of string): [optional]
145
+
146
+ Returns:
147
+ | ApiResponse
148
+
149
+ .. note::
150
+ This route takes ``application/vnd.sbadresource.v4+json``, the same
151
+ media type as the ads family, not the creative one.
152
+ """
153
+ json_version = 'application/vnd.sbadresource.v' + str(version) + "+json"
154
+ headers = {'Accept': json_version}
155
+
156
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
157
+
158
+ @sp_endpoint('/sb/ads/creatives/manualCollection', method='POST')
159
+ def create_manual_collection_ad_creative(self, version: int = 4, **kwargs) -> ApiResponse:
160
+ """
161
+ Creates a new version of a manual collection creative for an existing ad.
162
+
163
+ Request Body [Required]
164
+ | **ads** (array): [required] One entry per ad, each with ``adId``
165
+ and a ``creative`` block.
166
+
167
+ Returns:
168
+ | ApiResponse
169
+
170
+ .. note::
171
+ Also takes ``application/vnd.sbadresource.v4+json``.
172
+ """
173
+ json_version = 'application/vnd.sbadresource.v' + str(version) + "+json"
174
+ headers = {'Accept': json_version}
175
+
176
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
177
+
178
+ @sp_endpoint('/sb/ads/creatives/productCollectionExtended', method='POST')
179
+ @Utils.deprecated
180
+ def create_new_version_product_collection_extended_ad_creative(self, version: int = 4, **kwargs) -> ApiResponse:
181
+ """
182
+ Creates a new version of an extended product collection creative.
183
+
184
+ This route is flagged deprecated in the 4.0 contract. It still answers on
185
+ the live service, which is why it stays available, but new integrations
186
+ should use ``create_auto_collection_ad_creative`` or
187
+ ``create_manual_collection_ad_creative``.
188
+
189
+ Request Body [Required]
190
+ | **adId** (string): [required] Sponsored Brands ad identifier.
191
+ | **creative** ({}): [required]
192
+ | **asins** (array of string): [required]
193
+ | **brandName** (string): [required]
194
+ | **brandLogoAssetId** (string): [required]
195
+ | **headline** (string): [required]
196
+ | **landingPage** ({}): [optional] ``type``, ``url`` or ``asins``.
197
+ | **brandLogoCrop** ({}): [optional] ``top``, ``left``,
198
+ ``width`` and ``height``.
199
+ | **customImages** (array): [optional] Each with ``assetId``,
200
+ ``url`` and a ``crop``.
201
+ | **consentToTranslate** (boolean): [optional]
202
+
203
+ Returns:
204
+ | ApiResponse
205
+
206
+ .. note::
207
+ Unlike its siblings this route takes a single ``adId`` and
208
+ ``creative``, not an ``ads`` list, and it uses
209
+ ``application/vnd.sbAdCreativeResource.v4+json``. An empty body names
210
+ both required members.
211
+ """
212
+ json_version = 'application/vnd.sbAdCreativeResource.v' + str(version) + "+json"
213
+ headers = {'Accept': json_version}
214
+
215
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
216
+
131
217
  @sp_endpoint('/sb/ads/creatives/list', method='POST')
132
218
  def list_ad_creatives(self, version: int = 4, **kwargs) -> ApiResponse:
133
219
  """
ad_api/api/sb/ads_v4.py CHANGED
@@ -165,6 +165,85 @@ class AdsV4(Client):
165
165
 
166
166
  return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
167
167
 
168
+ @sp_endpoint('/sb/v4/ads/autoCollection', method='POST')
169
+ def create_auto_collection_ads(self, version: int = 4, **kwargs) -> ApiResponse:
170
+ """
171
+ Creates Sponsored Brands auto collection ads.
172
+
173
+ Request Body [Required]
174
+ | **ads** (array): [required] One entry per ad.
175
+ | **adGroupId** (string): [required] Ad group the ad belongs to.
176
+ | **name** (string): [required] Ad name.
177
+ | **state** (string): [required] ``ENABLED``, ``PAUSED`` or
178
+ ``ARCHIVED``.
179
+ | **creative** ({}): [required]
180
+ | **brandName** (string): [required]
181
+ | **brandLogoAssetID** (string): [optional]
182
+ | **brandLogoCrop** ({}): [optional] ``top``, ``left``,
183
+ ``width`` and ``height``.
184
+ | **asinExclusions** (array of string): [optional]
185
+
186
+ Returns:
187
+ | ApiResponse
188
+
189
+ .. note::
190
+ An empty body answers ``400 INVALID_ARGUMENT`` with
191
+ *"Ad list cannot be empty."*, and ``application/json`` answers
192
+ ``404 Could not find resource``, so the versioned media type is what
193
+ routes the call.
194
+ """
195
+ json_version = 'application/vnd.sbadresource.v' + str(version) + "+json"
196
+ headers = {'Accept': json_version}
197
+
198
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
199
+
200
+ @sp_endpoint('/sb/v4/ads/manualCollection', method='POST')
201
+ def create_manual_collection_ads(self, version: int = 4, **kwargs) -> ApiResponse:
202
+ """
203
+ Creates Sponsored Brands manual collection ads.
204
+
205
+ Request Body [Required]
206
+ | **ads** (array): [required] One entry per ad, each with
207
+ ``adGroupId``, ``name``, ``state`` and a ``creative`` block.
208
+
209
+ Returns:
210
+ | ApiResponse
211
+
212
+ .. note::
213
+ An empty body answers ``400 INVALID_ARGUMENT`` with
214
+ *"Ad list cannot be empty."*
215
+ """
216
+ json_version = 'application/vnd.sbadresource.v' + str(version) + "+json"
217
+ headers = {'Accept': json_version}
218
+
219
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
220
+
221
+ @sp_endpoint('/sb/v4/ads/productCollectionExtended', method='POST')
222
+ @Utils.deprecated
223
+ def create_product_collection_extended_ads(self, version: int = 4, **kwargs) -> ApiResponse:
224
+ """
225
+ Creates Sponsored Brands extended product collection ads.
226
+
227
+ This route is flagged deprecated in the 4.0 contract, together with the
228
+ creative side of the same name. It still answers on the live service,
229
+ which is why it stays available, but new integrations should use
230
+ ``create_auto_collection_ads`` or ``create_manual_collection_ads``.
231
+
232
+ Request Body [Required]
233
+ | **ads** (array): [required] One entry per ad.
234
+
235
+ Returns:
236
+ | ApiResponse
237
+
238
+ .. note::
239
+ An empty body answers ``400 INVALID_ARGUMENT`` with
240
+ *"Ad list cannot be empty."*
241
+ """
242
+ json_version = 'application/vnd.sbadresource.v' + str(version) + "+json"
243
+ headers = {'Accept': json_version}
244
+
245
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
246
+
168
247
  @sp_endpoint('/sb/v4/ads/delete', method='POST')
169
248
  def delete_ads(self, version: int = 4, **kwargs) -> ApiResponse:
170
249
  """
ad_api/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.1.6"
1
+ __version__ = "1.1.7"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 1.1.6
3
+ Version: 1.1.7
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,5 +1,5 @@
1
1
  ad_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ad_api/version.py,sha256=fe1i7ytQ67cmOi4fKSpfB74e36dkRgec1zdg71uuRFM,22
2
+ ad_api/version.py,sha256=p2qAfdU7zHOShJi2f1FW-_7Tbm0-KCPE7CI7284QiHg,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
@@ -25,10 +25,10 @@ ad_api/api/stores.py,sha256=7W3RJKZyZOQ3nHzInvK9FDhWTXCH6Xe9a6dCBatEZ-o,2484
25
25
  ad_api/api/stream.py,sha256=JpnF8SKniOAHiEnEq1RPrh6tNy-Q2-8GPBTmnlxEXqQ,2989
26
26
  ad_api/api/validation_configurations.py,sha256=V3o06uWGwvA_Ly1x2lAiCk35Wo7DC_k8AtHgMdpm6wU,3830
27
27
  ad_api/api/sb/__init__.py,sha256=APbCAkWM1gzYuhpEUU98XDIKJKJx1NXALjLBXA9zdBU,1538
28
- ad_api/api/sb/ad_creatives_v4.py,sha256=86sF2lhSc3AC6d4P5TXyEnJMBjn9HvsJe4bbCQbSWK0,10508
28
+ ad_api/api/sb/ad_creatives_v4.py,sha256=zQzTivDkGzX3I5ZfCWIlzRUGWfTRsXJZCKQrKMaMDpc,14512
29
29
  ad_api/api/sb/ad_groups.py,sha256=W06Fk0CCsuEYen1Bd8obR6aHpOMhk6tGWNWApecw59c,2882
30
30
  ad_api/api/sb/ad_groups_v4.py,sha256=f6KpOrJ2RsCa4aznP8vdGbXp0HGsCmLOvC9yXX2pESc,3669
31
- ad_api/api/sb/ads_v4.py,sha256=EOn-ts0cPqCwt5vdGq6rkDHyYPoT6vbDP8UQE-TFjmE,7931
31
+ ad_api/api/sb/ads_v4.py,sha256=s31OYVO6nyyKRgQAvMc4YtCcHhCo-Anx-r2kq22rPG8,11373
32
32
  ad_api/api/sb/benchmarks.py,sha256=eeWv2rrRf4ttK-oI1EEEiui_rl_sxJk9yXcu6sDSfhg,3645
33
33
  ad_api/api/sb/bid_recommendations.py,sha256=ssO9XwYC9wK2GFaLtcsC-D3cZhDpCclcu1r01LTkZAw,2297
34
34
  ad_api/api/sb/brands.py,sha256=XIMDzV0tJoPiOcY0KoCKcyIwYLPMlJ-zkB2SeRVMF4Q,1376
@@ -108,8 +108,8 @@ ad_api/base/exceptions.py,sha256=9D3M40ZIlLS0fA-aQh1BTWPOW-Nvf0tRhbA85jFnDJ4,438
108
108
  ad_api/base/helpers.py,sha256=naUkDLK466x_OBCPXxMlzRc2nPC6iQ6H_vyUji0MJJ0,2282
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.1.6.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
112
- python_amazon_ad_api-1.1.6.dist-info/METADATA,sha256=z5F7aaY5WflWIew3RRAup1tAxtWYyE7sTzzSd2lwIfw,20486
113
- python_amazon_ad_api-1.1.6.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
114
- python_amazon_ad_api-1.1.6.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
115
- python_amazon_ad_api-1.1.6.dist-info/RECORD,,
111
+ python_amazon_ad_api-1.1.7.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
112
+ python_amazon_ad_api-1.1.7.dist-info/METADATA,sha256=ySlzzw2eMqLcY38Pk2d32nnEH-zGKjcnpoB-PQ5fz2E,20486
113
+ python_amazon_ad_api-1.1.7.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
114
+ python_amazon_ad_api-1.1.7.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
115
+ python_amazon_ad_api-1.1.7.dist-info/RECORD,,