|
@@ -296,7 +296,7 @@ class SBClient(BaseClient):
|
|
|
|
|
|
def get_keywords(self,**param):
|
|
|
url_path = "/sb/keywords"
|
|
|
- return self._request(url_path, method="GET")
|
|
|
+ return self._request(url_path, method="GET",params=param)
|
|
|
|
|
|
def iter_keywords(self,**param):
|
|
|
if "startIndex" not in param:
|
|
@@ -431,41 +431,42 @@ if __name__ == '__main__':
|
|
|
# matchType=["broad","exact"]))
|
|
|
sb = SBClient(**AWS_CREDENTIALS)
|
|
|
# print(list(sb.iter_targets()))
|
|
|
- print(sb.get_keyword_bidrecommendation(**{'campaignId': 27333596383941, 'keywords': [
|
|
|
- {"matchType": 'broad', "keywordText": "4k security camera system"}]}))
|
|
|
- print(sb.get_budget([27333596383941]))
|
|
|
+ # print(sb.get_keyword_bidrecommendation(**{'campaignId': 27333596383941, 'keywords': [
|
|
|
+ # {"matchType": 'broad', "keywordText": "4k security camera system"}]}))
|
|
|
+ a = list(sb.iter_keywords())
|
|
|
+ print(a,len(a))
|
|
|
# sd = SDClient(**AWS_CREDENTIALS)
|
|
|
# print(sd.get_campaigns(startIndex=10, count=10))
|
|
|
|
|
|
- sb = SBClient(**AWS_CREDENTIALS)
|
|
|
- metrics = [
|
|
|
- 'applicableBudgetRuleId',
|
|
|
- 'applicableBudgetRuleName',
|
|
|
- 'attributedConversions14d',
|
|
|
- 'attributedConversions14dSameSKU',
|
|
|
- 'attributedDetailPageViewsClicks14d',
|
|
|
- 'attributedOrderRateNewToBrand14d',
|
|
|
- 'attributedOrdersNewToBrand14d',
|
|
|
- 'attributedOrdersNewToBrandPercentage14d',
|
|
|
- 'attributedSales14d',
|
|
|
- 'attributedSales14dSameSKU',
|
|
|
- 'attributedSalesNewToBrand14d',
|
|
|
- 'attributedSalesNewToBrandPercentage14d',
|
|
|
- 'attributedUnitsOrderedNewToBrand14d',
|
|
|
- 'attributedUnitsOrderedNewToBrandPercentage14d',
|
|
|
- 'campaignBudget',
|
|
|
- 'campaignBudgetType',
|
|
|
- 'campaignId',
|
|
|
- 'campaignName',
|
|
|
- 'campaignRuleBasedBudget',
|
|
|
- 'campaignStatus',
|
|
|
- 'clicks',
|
|
|
- 'cost',
|
|
|
- 'dpv14d',
|
|
|
- 'impressions',
|
|
|
- 'unitsSold14d',
|
|
|
- 'attributedBrandedSearches14d',
|
|
|
- 'topOfSearchImpressionShare']
|
|
|
+ # sb = SBClient(**AWS_CREDENTIALS)
|
|
|
+ # metrics = [
|
|
|
+ # 'applicableBudgetRuleId',
|
|
|
+ # 'applicableBudgetRuleName',
|
|
|
+ # 'attributedConversions14d',
|
|
|
+ # 'attributedConversions14dSameSKU',
|
|
|
+ # 'attributedDetailPageViewsClicks14d',
|
|
|
+ # 'attributedOrderRateNewToBrand14d',
|
|
|
+ # 'attributedOrdersNewToBrand14d',
|
|
|
+ # 'attributedOrdersNewToBrandPercentage14d',
|
|
|
+ # 'attributedSales14d',
|
|
|
+ # 'attributedSales14dSameSKU',
|
|
|
+ # 'attributedSalesNewToBrand14d',
|
|
|
+ # 'attributedSalesNewToBrandPercentage14d',
|
|
|
+ # 'attributedUnitsOrderedNewToBrand14d',
|
|
|
+ # 'attributedUnitsOrderedNewToBrandPercentage14d',
|
|
|
+ # 'campaignBudget',
|
|
|
+ # 'campaignBudgetType',
|
|
|
+ # 'campaignId',
|
|
|
+ # 'campaignName',
|
|
|
+ # 'campaignRuleBasedBudget',
|
|
|
+ # 'campaignStatus',
|
|
|
+ # 'clicks',
|
|
|
+ # 'cost',
|
|
|
+ # 'dpv14d',
|
|
|
+ # 'impressions',
|
|
|
+ # 'unitsSold14d',
|
|
|
+ # 'attributedBrandedSearches14d',
|
|
|
+ # 'topOfSearchImpressionShare']
|
|
|
# sb.get_report(
|
|
|
# record_type="campaigns",
|
|
|
# report_date="20231008",
|