python-amazon-ad-api 1.0.9__py3-none-any.whl → 1.1.0__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.
@@ -6,6 +6,13 @@ class BidRecommendations(Client):
6
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
7
  """
8
8
 
9
+ _ACCEPT = 'application/vnd.sbbidsrecommendation.v3+json'
10
+
11
+ @classmethod
12
+ def _accept(cls):
13
+ """Response media type the v3 contract declares for these routes."""
14
+ return {"Accept": cls._ACCEPT}
15
+
9
16
  @sp_endpoint('/sb/recommendations/bids', method='POST')
10
17
  def get_bid_recommendations(self, **kwargs) -> ApiResponse:
11
18
  r"""
@@ -32,4 +39,5 @@ class BidRecommendations(Client):
32
39
 
33
40
  """
34
41
 
35
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
42
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False),
43
+ params=kwargs, headers=self._accept())
ad_api/api/sb/brands.py CHANGED
@@ -6,6 +6,13 @@ class Brands(Client):
6
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
7
  """
8
8
 
9
+ _ACCEPT = 'application/vnd.brand.v3+json'
10
+
11
+ @classmethod
12
+ def _accept(cls):
13
+ """Response media type the v3 contract declares for these routes."""
14
+ return {"Accept": cls._ACCEPT}
15
+
9
16
  @sp_endpoint('/brands', method='GET')
10
17
  def list_brands(self, **kwargs) -> ApiResponse:
11
18
  """
@@ -22,4 +29,4 @@ class Brands(Client):
22
29
  | '**brandRegistryName**': *string*, {'description': 'The Brand name.'}
23
30
 
24
31
  """
25
- return self._request(kwargs.pop('path'), params=kwargs)
32
+ return self._request(kwargs.pop('path'), params=kwargs, headers=self._accept())
@@ -2,6 +2,15 @@ from ad_api.base import Client, sp_endpoint, ApiResponse, Utils
2
2
 
3
3
 
4
4
  class KeywordsRecommendations(Client):
5
+
6
+ _ACCEPT = 'application/vnd.sbkeywordrecommendation.v3+json'
7
+
8
+ @classmethod
9
+ def _accept(cls):
10
+ """Response media type the v3 contract declares for these routes."""
11
+ return {"Accept": cls._ACCEPT}
12
+
5
13
  @sp_endpoint('/sb/recommendations/keyword', method='POST')
6
14
  def list_keywords_recommendations(self, **kwargs) -> ApiResponse:
7
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
15
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False),
16
+ params=kwargs, headers=self._accept())
@@ -6,6 +6,13 @@ class PageAsins(Client):
6
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
7
  """
8
8
 
9
+ _ACCEPT = 'application/vnd.pageasins.v3+json'
10
+
11
+ @classmethod
12
+ def _accept(cls):
13
+ """Response media type the v3 contract declares for these routes."""
14
+ return {"Accept": cls._ACCEPT}
15
+
9
16
  @sp_endpoint('/pageAsins', method='GET')
10
17
  def get_page_asins(self, **kwargs) -> ApiResponse:
11
18
  """
@@ -18,4 +25,4 @@ class PageAsins(Client):
18
25
  Returns
19
26
  asinList
20
27
  """
21
- return self._request(kwargs.pop('path'), params=kwargs)
28
+ return self._request(kwargs.pop('path'), params=kwargs, headers=self._accept())
@@ -6,6 +6,13 @@ class NegativeKeywords(Client):
6
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
7
  """
8
8
 
9
+ _ACCEPT = 'application/vnd.sbnegativekeyword.v3.2+json'
10
+
11
+ @classmethod
12
+ def _accept(cls):
13
+ """Response media type the v3 contract declares for these routes."""
14
+ return {"Accept": cls._ACCEPT}
15
+
9
16
  @sp_endpoint('/sb/negativeKeywords', method='GET')
10
17
  def list_negative_keywords(self, **kwargs) -> ApiResponse:
11
18
  r"""
@@ -26,7 +33,7 @@ class NegativeKeywords(Client):
26
33
  | ApiResponse
27
34
 
28
35
  """
29
- return self._request(kwargs.pop('path'), params=kwargs)
36
+ return self._request(kwargs.pop('path'), params=kwargs, headers=self._accept())
30
37
 
31
38
  @sp_endpoint('/sb/negativeKeywords', method='PUT')
32
39
  def edit_negative_keywords(self, **kwargs) -> ApiResponse:
@@ -6,6 +6,13 @@ class NegativeTargets(Client):
6
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
7
  """
8
8
 
9
+ _ACCEPT = 'application/vnd.sblistnegativetargetsresponse.v3.2+json'
10
+
11
+ @classmethod
12
+ def _accept(cls):
13
+ """Response media type the v3 contract declares for the listing route."""
14
+ return {'Accept': cls._ACCEPT}
15
+
9
16
  @sp_endpoint('/sb/negativeTargets/list', method='POST')
10
17
  def list_negative_targets(self, **kwargs) -> ApiResponse:
11
18
  r"""
@@ -28,7 +35,8 @@ class NegativeTargets(Client):
28
35
  Returns:
29
36
  ApiResponse
30
37
  """
31
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
38
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False),
39
+ params=kwargs, headers=self._accept())
32
40
 
33
41
  @sp_endpoint('/sb/negativeTargets', method='PUT')
34
42
  def edit_negative_targets(self, **kwargs) -> ApiResponse:
ad_api/api/sb/reports.py CHANGED
@@ -8,6 +8,13 @@ class Reports(Client):
8
8
 
9
9
  """
10
10
 
11
+ _ACCEPT = 'application/json'
12
+
13
+ @classmethod
14
+ def _accept(cls):
15
+ """Response media type the v3 contract declares for these routes."""
16
+ return {"Accept": cls._ACCEPT}
17
+
11
18
  @sp_endpoint('/v2/hsa/{}/report', method='POST')
12
19
  def post_report(self, recordType, **kwargs) -> ApiResponse:
13
20
  r"""Requests a Sponsored Brands report.
@@ -27,7 +34,8 @@ class Reports(Client):
27
34
  ApiResponse
28
35
 
29
36
  """
30
- return self._request(fill_query_params(kwargs.pop('path'), recordType), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
37
+ return self._request(fill_query_params(kwargs.pop('path'), recordType), data=Utils.convert_body(kwargs.pop('body'), False),
38
+ params=kwargs, headers=self._accept())
31
39
 
32
40
  @sp_endpoint('/v2/reports/{}', method='GET')
33
41
  def get_report(self, reportId, **kwargs) -> ApiResponse:
@@ -42,7 +50,7 @@ class Reports(Client):
42
50
  Returns:
43
51
  ApiResponse
44
52
  """
45
- return self._request(fill_query_params(kwargs.pop('path'), reportId), params=kwargs)
53
+ return self._request(fill_query_params(kwargs.pop('path'), reportId), params=kwargs, headers=self._accept())
46
54
 
47
55
  def download_report(self, **kwargs) -> ApiResponse:
48
56
  r"""Downloads the report previously get report specified by location
ad_api/api/sb/stores.py CHANGED
@@ -24,7 +24,8 @@ class Stores(Client):
24
24
  Returns:
25
25
  | ApiResponse
26
26
  """
27
- return self._request(kwargs.pop('path'), params=kwargs)
27
+ return self._request(kwargs.pop('path'), params=kwargs,
28
+ headers={'Accept': 'application/vnd.mediaasset.v3+json'})
28
29
 
29
30
  @sp_endpoint('/stores/assets', method='POST')
30
31
  def create_asset(self, image, brandEntityId, mediaType='brandLogo', filename=None, **kwargs) -> ApiResponse:
ad_api/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.0.9"
1
+ __version__ = "1.1.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 1.0.9
3
+ Version: 1.1.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,5 +1,5 @@
1
1
  ad_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ad_api/version.py,sha256=q2ACMkQx0Hm5xKo2YKJFBE7rTruciTSIN6AvWWL9nB8,22
2
+ ad_api/version.py,sha256=LGVQyDsWifdACo7qztwb8RWWHds1E7uQ-ZqD8SAjyw4,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
@@ -30,21 +30,21 @@ ad_api/api/sb/ad_groups.py,sha256=W06Fk0CCsuEYen1Bd8obR6aHpOMhk6tGWNWApecw59c,28
30
30
  ad_api/api/sb/ad_groups_v4.py,sha256=f6KpOrJ2RsCa4aznP8vdGbXp0HGsCmLOvC9yXX2pESc,3669
31
31
  ad_api/api/sb/ads_v4.py,sha256=EOn-ts0cPqCwt5vdGq6rkDHyYPoT6vbDP8UQE-TFjmE,7931
32
32
  ad_api/api/sb/benchmarks.py,sha256=eeWv2rrRf4ttK-oI1EEEiui_rl_sxJk9yXcu6sDSfhg,3645
33
- ad_api/api/sb/bid_recommendations.py,sha256=x1VEF7AqIV0HMlNiHc21qdmYhWQckNm8RjZvVPhXy8A,2026
34
- ad_api/api/sb/brands.py,sha256=lOtI-K_OnEGQu-S8vfH86WGe34Ex7cws20Akr624xZc,1149
33
+ ad_api/api/sb/bid_recommendations.py,sha256=ssO9XwYC9wK2GFaLtcsC-D3cZhDpCclcu1r01LTkZAw,2297
34
+ ad_api/api/sb/brands.py,sha256=XIMDzV0tJoPiOcY0KoCKcyIwYLPMlJ-zkB2SeRVMF4Q,1376
35
35
  ad_api/api/sb/campaigns.py,sha256=41yRnrgvx4-9Zra7Zdqtzr2Ptq__YD-mHOWbACaEQOk,13674
36
36
  ad_api/api/sb/campaigns_v4.py,sha256=_SfEQhHCS90UaSxOq35mm7NAr2BVpqJ4gzAbauVCZiA,7290
37
37
  ad_api/api/sb/forecast.py,sha256=hFOYQi4qlvsIkTRiqiexiI4XRv1tWmdnvQZk9Sl641A,334
38
38
  ad_api/api/sb/keywords.py,sha256=P1dGqcLia349O0CwpBRURlIzgRc0cbFotkAGTSrErt4,7634
39
- ad_api/api/sb/keywords_recommendations.py,sha256=B8d_nR4T6ZFSfUqG75ZuL8eaL7Sy7cYSn-cWW8uDFf0,354
40
- ad_api/api/sb/landing_page_asins.py,sha256=GY4COVSw034XwDT9VMJT71YcrZ92ZrYJg6dY-5ieg3E,1028
39
+ ad_api/api/sb/keywords_recommendations.py,sha256=oA4FRBwDtk52SZK0RgWvjNQ7K2GX0G2zSoisJGiEYDw,629
40
+ ad_api/api/sb/landing_page_asins.py,sha256=j3qi2-KccuEzGLZrl6EfZBSikW2R4B4l7TixpkAnTq8,1259
41
41
  ad_api/api/sb/media.py,sha256=wHa91d9qQb-bvBS5vaeNqlaAJ60iITedj-Hr9yR5aaw,1634
42
- ad_api/api/sb/negative_keywords.py,sha256=oCirwkq2e0jvhCbkNgY1GPy7p9DuIqFG-oNoh53-yGc,6677
43
- ad_api/api/sb/negative_product_targeting.py,sha256=AZV6-Wunf8Q61CItckkM2mbLiWgPEbA9cbmpmMXfGiM,4798
42
+ ad_api/api/sb/negative_keywords.py,sha256=ww3IRbawidDHAaYIkX5SsH2OZKJj4UnCylqqFeq3OoY,6918
43
+ ad_api/api/sb/negative_product_targeting.py,sha256=QbK1EhhzmnNOzGtbkrAZ4HS5OqiLU3nZBmsl1scd2D0,5085
44
44
  ad_api/api/sb/product_targeting.py,sha256=o6aB3hIh9jKvi_uTXFi--1hpnPFuXzQ-U9N7VUP_Bz4,5362
45
45
  ad_api/api/sb/recommendations.py,sha256=Ck4DLAKLTqwodmQJfih9MUD1sujG6LDjRlSoefKmOC4,356
46
- ad_api/api/sb/reports.py,sha256=KzQiCI17E-_-KjbuPbz2X0cgpC_aqKRMb5WuUYc6mTM,3534
47
- ad_api/api/sb/stores.py,sha256=4LuRnP-Jx9GcvpO86vnmJumauV0V-zpc5_b4x2U_iSY,4284
46
+ ad_api/api/sb/reports.py,sha256=icw5DpRrqfj0idEo0NN1GPDpIWQun2h_c2Uwc7CpNUA,3801
47
+ ad_api/api/sb/stores.py,sha256=sLdA6Lp37VR-ldu_sTUZIqc8MbMzysPhNOh05VaKBcA,4371
48
48
  ad_api/api/sb/targeting_recommendations.py,sha256=_7NxD5kC-Od11QOuLT03qpLVxEOIZgy-BtzniWK4CI8,2862
49
49
  ad_api/api/sb/themes.py,sha256=rjxdGcllaqLOUMoTKKgBVSH5iKuxMdF0w-dHq0X3-yU,4618
50
50
  ad_api/api/sd/__init__.py,sha256=RulShFVpowt2L_ZMcifFVgVrQEg5Uf9_SlVRydUnTF4,911
@@ -104,8 +104,8 @@ ad_api/base/exceptions.py,sha256=9D3M40ZIlLS0fA-aQh1BTWPOW-Nvf0tRhbA85jFnDJ4,438
104
104
  ad_api/base/helpers.py,sha256=naUkDLK466x_OBCPXxMlzRc2nPC6iQ6H_vyUji0MJJ0,2282
105
105
  ad_api/base/marketplaces.py,sha256=44lvCcluXNpqTprWQ80e3weSQmQbJoWL-WDSOWVbCyQ,4657
106
106
  ad_api/base/utils.py,sha256=_qnCBOvyJTLgaZjJzUWTi38GGLHkQszXELs79133Rb4,5618
107
- python_amazon_ad_api-1.0.9.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
108
- python_amazon_ad_api-1.0.9.dist-info/METADATA,sha256=p32-3tHaR3AOfdlkB1LauUgIsoZt0tlbsynmCPAmk3s,20486
109
- python_amazon_ad_api-1.0.9.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
110
- python_amazon_ad_api-1.0.9.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
111
- python_amazon_ad_api-1.0.9.dist-info/RECORD,,
107
+ python_amazon_ad_api-1.1.0.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
108
+ python_amazon_ad_api-1.1.0.dist-info/METADATA,sha256=tTSo2QGb0e6DIYzbUPaIclYQ1iLHTZ-OlglceAaMvGw,20486
109
+ python_amazon_ad_api-1.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
110
+ python_amazon_ad_api-1.1.0.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
111
+ python_amazon_ad_api-1.1.0.dist-info/RECORD,,