python-amazon-ad-api 1.1.7__py3-none-any.whl → 1.1.8__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.
@@ -77,6 +77,34 @@ class CampaignsV4(Client):
77
77
 
78
78
  return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
79
79
 
80
+ @sp_endpoint('/sb/campaigns/insights', method='POST')
81
+ def get_campaign_insights(self, version: int = 4, **kwargs) -> ApiResponse:
82
+ """
83
+ Gets insights for campaign ad groups.
84
+
85
+ Request Body [Required]
86
+ | **adGroups** (array): [required] One entry per ad group.
87
+ | **adFormat** (string): [required] Ad format of the ad group.
88
+ | **keywords** (array): [optional] Each entry needs
89
+ ``keywordText``, ``matchType`` and ``bid``.
90
+
91
+ Returns:
92
+ | ApiResponse, ``200``.
93
+
94
+ .. note::
95
+ This route takes ``application/vnd.sbinsights.v4+json``, not the
96
+ campaigns media type. With ``application/json`` it answers ``404
97
+ Could not find resource``, so the versioned type is what routes it.
98
+
99
+ .. note::
100
+ An empty body answers ``400`` naming ``adGroups``, which is the only
101
+ required member.
102
+ """
103
+ json_version = 'application/vnd.sbinsights.v' + str(version) + "+json"
104
+ headers = {'Accept': json_version}
105
+
106
+ return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers)
107
+
80
108
  @sp_endpoint('/sb/v4/campaigns/list', method='POST')
81
109
  def list_campaigns(self, version: int = 4, **kwargs) -> ApiResponse:
82
110
  """
@@ -67,6 +67,29 @@ class TargetingCategories(Client):
67
67
  params=kwargs,
68
68
  headers={'Accept': self._MEDIA, 'Content-Type': self._MEDIA})
69
69
 
70
+ @sp_endpoint('/sb/negativeTargets/brands/recommendations', method='GET')
71
+ def list_negative_brand_recommendations(self, **kwargs) -> ApiResponse:
72
+ """
73
+ Gets brand recommendations for negative targeting.
74
+
75
+ Keyword Args
76
+ | query **nextToken** (string): [optional] Pagination token.
77
+
78
+ Returns:
79
+ | ApiResponse, ``200``, with brands under ``brands``, each carrying
80
+ ``brandRefinementId`` and ``name``.
81
+
82
+ Example::
83
+
84
+ {"brands": [{"brandRefinementId": "19897490031", "name": "YEYIAN"}]}
85
+
86
+ .. note::
87
+ Lives here because it shares this class media type. It is the one
88
+ route in this class that is not about the category tree.
89
+ """
90
+ return self._request(kwargs.pop('path'), params=kwargs,
91
+ headers={'Accept': self._MEDIA, 'Content-Type': self._MEDIA})
92
+
70
93
  @sp_endpoint('/sb/targets/products/count', method='POST')
71
94
  def get_product_count(self, category, **kwargs) -> ApiResponse:
72
95
  """
ad_api/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.1.7"
1
+ __version__ = "1.1.8"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-amazon-ad-api
3
- Version: 1.1.7
3
+ Version: 1.1.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
@@ -1,5 +1,5 @@
1
1
  ad_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- ad_api/version.py,sha256=p2qAfdU7zHOShJi2f1FW-_7Tbm0-KCPE7CI7284QiHg,22
2
+ ad_api/version.py,sha256=ii9AGvWXG_4qHN0FEZs45urJ5UrPQ9I83YjXUjFMvtI,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
@@ -34,7 +34,7 @@ ad_api/api/sb/bid_recommendations.py,sha256=ssO9XwYC9wK2GFaLtcsC-D3cZhDpCclcu1r0
34
34
  ad_api/api/sb/brands.py,sha256=XIMDzV0tJoPiOcY0KoCKcyIwYLPMlJ-zkB2SeRVMF4Q,1376
35
35
  ad_api/api/sb/budget_rules.py,sha256=8hyJ4yD-myR4atYmTm8KsTSB5ZNfASGe2fxgwRv4SRs,10029
36
36
  ad_api/api/sb/campaigns.py,sha256=41yRnrgvx4-9Zra7Zdqtzr2Ptq__YD-mHOWbACaEQOk,13674
37
- ad_api/api/sb/campaigns_v4.py,sha256=_SfEQhHCS90UaSxOq35mm7NAr2BVpqJ4gzAbauVCZiA,7290
37
+ ad_api/api/sb/campaigns_v4.py,sha256=F50vFI2qyIKssEhPFCu4NXnq9trSIGywVNA5uVpp6rc,8504
38
38
  ad_api/api/sb/forecast.py,sha256=qf2ivhGX3_dv_uMGP9cmrt_x3S7QLg-P_5nCI8bAr00,3967
39
39
  ad_api/api/sb/keywords.py,sha256=P1dGqcLia349O0CwpBRURlIzgRc0cbFotkAGTSrErt4,7634
40
40
  ad_api/api/sb/keywords_recommendations.py,sha256=oA4FRBwDtk52SZK0RgWvjNQ7K2GX0G2zSoisJGiEYDw,629
@@ -48,7 +48,7 @@ ad_api/api/sb/product_targeting.py,sha256=o6aB3hIh9jKvi_uTXFi--1hpnPFuXzQ-U9N7VU
48
48
  ad_api/api/sb/recommendations.py,sha256=_21L8tZPuArmJ30XyR1SKQHQH_yswvF0IMqwD9sLhgY,347
49
49
  ad_api/api/sb/reports.py,sha256=icw5DpRrqfj0idEo0NN1GPDpIWQun2h_c2Uwc7CpNUA,3801
50
50
  ad_api/api/sb/stores.py,sha256=sLdA6Lp37VR-ldu_sTUZIqc8MbMzysPhNOh05VaKBcA,4371
51
- ad_api/api/sb/targeting_categories.py,sha256=mTU3hMEW_orG_D2mlTqUX14DEDPn9A11vH-wntECklk,4212
51
+ ad_api/api/sb/targeting_categories.py,sha256=QqOB2vTiS5c8u9qvbjRpeKJdGBkMWfgwWSoF3h-Eg4c,5114
52
52
  ad_api/api/sb/targeting_recommendations.py,sha256=_7NxD5kC-Od11QOuLT03qpLVxEOIZgy-BtzniWK4CI8,2862
53
53
  ad_api/api/sb/themes.py,sha256=rjxdGcllaqLOUMoTKKgBVSH5iKuxMdF0w-dHq0X3-yU,4618
54
54
  ad_api/api/sd/__init__.py,sha256=RulShFVpowt2L_ZMcifFVgVrQEg5Uf9_SlVRydUnTF4,911
@@ -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.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,,
111
+ python_amazon_ad_api-1.1.8.dist-info/licenses/LICENSE,sha256=h2rpqlmmLy-4l1tN6KpWAFxx1JEMYeEFrMrZUbx_B_o,1105
112
+ python_amazon_ad_api-1.1.8.dist-info/METADATA,sha256=-W9EOI2Z4NSB1KGtu1av3VB63ZLe98HiPOAKAgEHg5o,20486
113
+ python_amazon_ad_api-1.1.8.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
114
+ python_amazon_ad_api-1.1.8.dist-info/top_level.txt,sha256=nN9twUos-8pkP514ZwpvRU9YL9L2XyQyHsMQFfudGTU,7
115
+ python_amazon_ad_api-1.1.8.dist-info/RECORD,,