-
-
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.
added modules product_targeting, negative_product_targeting
- Loading branch information
Showing
11 changed files
with
486 additions
and
50 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
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,31 @@ | ||
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse | ||
|
||
class CampaignNegativeKeywords(Client): | ||
|
||
@sp_endpoint('/v2/sp/campaignNegativeKeywords', method='GET') | ||
def list_campaign_negative_keywords_request(self, **kwargs) -> ApiResponse: | ||
return self._request(kwargs.pop('path'), params=kwargs) | ||
|
||
@sp_endpoint('/v2/sp/campaignNegativeKeywords/extended', method='GET') | ||
def list_campaign_negative_keywords_extended_request(self, **kwargs) -> ApiResponse: | ||
return self._request(kwargs.pop('path'), params=kwargs) | ||
|
||
@sp_endpoint('/v2/sp/campaignNegativeKeywords/{}', method='GET') | ||
def get_campaign_negative_keywords_request(self, keywordId, **kwargs) -> ApiResponse: | ||
return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs) | ||
|
||
@sp_endpoint('/v2/sp/campaignNegativeKeywords/extended/{}', method='GET') | ||
def get_campaign_negative_keywords_extended_request(self, keywordId, **kwargs) -> ApiResponse: | ||
return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs) | ||
|
||
@sp_endpoint('/v2/sp/campaignNegativeKeywords/{}', method='DELETE') | ||
def delete_campaign_negative_keywords_request(self, keywordId, **kwargs) -> ApiResponse: | ||
return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs) | ||
|
||
@sp_endpoint('/v2/sp/campaignNegativeKeywords', method='POST') | ||
def create_campaign_negative_keywords_request(self, **kwargs) -> ApiResponse: | ||
return self._request(kwargs.pop('path'), data=kwargs.pop('body'), params=kwargs) | ||
|
||
@sp_endpoint('/v2/sp/campaignNegativeKeywords', method='PUT') | ||
def edit_campaign_negative_keywords_request(self, **kwargs) -> ApiResponse: | ||
return self._request(kwargs.pop('path'), data=kwargs.pop('body'), params=kwargs) |
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
Oops, something went wrong.