-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils | ||
|
||
|
||
class Stores(Client): | ||
""" | ||
Brand Metrics provides a new measurement solution that quantifies opportunities for your brand at each stage of the customer journey on Amazon, and helps brands understand the value of different shopping engagements that impact stages of that journey. You can now access Awareness and Consideration indices that compare your performance to peers using models predictive of consideration and sales. Brand Metrics quantifies the number of customers in the awareness and consideration marketing funnel stages and is built at scale to measure all shopping engagements with your brand on Amazon, not just ad-attributed engagements. Additionally, BM breaks out key shopping engagements at each stage of the shopping journey, along with the Return on Engagement, so you can measure the historical sales following a consideration event or purchase. | ||
""" | ||
|
||
@sp_endpoint('/stores/{}/asinMetrics', method='POST') | ||
def get_asin_engagement_for_store(self, brandEntityId, version: int = 1, **kwargs) -> ApiResponse: | ||
r""" | ||
getAsinEngagementForStore | ||
""" | ||
content_type = 'application/vnd.GetAsinEngagementForStoreRequest.v'+ str(version) +'+json' | ||
accept = 'application/vnd.GetAsinEngagementForStoreResponse.v'+ str(version) +'+json' | ||
headers = {'Content-Type': content_type, 'Accept': accept} | ||
return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers) | ||
|
||
@sp_endpoint('/stores/{}/insights', method='GET') | ||
def get_insights_for_store_api(self, brandEntityId, version: int = 1, **kwargs) -> ApiResponse: | ||
r""" | ||
getInsightsForStoreAPI | ||
""" | ||
content_type = 'application/vnd.GetInsightsForStoreRequest.v'+ str(version) +'+json' | ||
# accept = 'application/vnd.GetInsightsForStoreResponse.v'+ str(version) +'+json' | ||
# headers = {'Content-Type': content_type, 'Accept': accept} | ||
return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), | ||
data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs) | ||
# return self._request(fill_query_params(kwargs.pop('path'), brandEntityId), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs, headers=headers) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.5.5" | ||
__version__ = "0.5.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = python-amazon-ad-api | ||
version = 0.5.5 | ||
version = 0.5.6 | ||
author = Daniel Alvaro | ||
author_email = [email protected] | ||
description = Python wrapper for the Amazon Advertising API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters