python-amazon-ad-api 1.0.4__py3-none-any.whl → 1.0.6__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.
ad_api/api/sp/keywords.py DELETED
@@ -1,172 +0,0 @@
1
- from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
2
-
3
-
4
- class Keywords(Client):
5
- @sp_endpoint('/v2/sp/keywords/{}', method='GET')
6
- @Utils.deprecated
7
- def get_keyword(self, keywordId, **kwargs) -> ApiResponse:
8
- r"""
9
-
10
- get_keyword(self, keywordId, **kwargs) -> ApiResponse
11
-
12
- Gets a keyword specified by identifier.
13
-
14
- path **keywordId**:*number* | Required. The identifier of an existing keyword.
15
- query **locale**:*number* | Optional. The locale preference of the advertiser.
16
-
17
- Returns:
18
-
19
- ApiResponse
20
-
21
- """
22
- return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs)
23
-
24
- @sp_endpoint('/v2/sp/keywords/{}', method='DELETE')
25
- @Utils.deprecated
26
- def delete_keyword(self, keywordId, **kwargs) -> ApiResponse:
27
- r"""
28
- delete_keyword(self, keywordId, **kwargs) -> ApiResponse:
29
-
30
- Archives a keyword.
31
-
32
- path **keywordId**:*number* | Required. The identifier of an existing keyword.
33
-
34
- Returns:
35
-
36
- ApiResponse
37
-
38
- """
39
- return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs)
40
-
41
- @sp_endpoint('/v2/sp/keywords/extended/{}', method='GET')
42
- @Utils.deprecated
43
- def get_keyword_extended(self, keywordId, **kwargs) -> ApiResponse:
44
- r"""
45
-
46
- get_keyword_extended(self, keywordId, **kwargs) -> ApiResponse
47
-
48
- Gets a keyword with extended data fields.
49
-
50
- path **keywordId**:*number* | Required. The identifier of an existing keyword.
51
- query **locale**:*number* | Optional. The locale preference of the advertiser.
52
-
53
- Returns:
54
-
55
- ApiResponse
56
-
57
- """
58
- return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs)
59
-
60
- @sp_endpoint('/v2/sp/keywords/extended', method='GET')
61
- @Utils.deprecated
62
- def list_keywords_extended(self, **kwargs) -> ApiResponse:
63
- r"""
64
- list_keywords_extended(self, **kwargs) -> ApiResponse
65
-
66
- Gets a list of keywords that have extended data fields.
67
-
68
- query **startIndex**:*integer* | Optional. 0-indexed record offset for the result set. Default value : 0
69
-
70
- query **count**:*integer* | Optional. Number of records to include in the paged response. Defaults to max page size.
71
-
72
- query **matchTypeFilter**:*string* | Optional. Restricts results to keywords with match types within the specified comma-separated list.. Available values : broad, phrase, exact.
73
-
74
- query **keywordText**:*string* | Optional. Restricts results to keywords that match the specified text exactly.
75
-
76
- query **stateFilter**:*string* | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
77
-
78
- query **campaignIdFilter**:*string* | Optional. A comma-delimited list of campaign identifiers.
79
-
80
- query **adGroupIdFilter**:*string* | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
81
-
82
- query **keywordIdFilter**:*string* | Optional. Restricts results to keywords associated with campaigns specified by identifier in the comma-delimited list..
83
-
84
- query **locale**:*string* | Optional. Restricts results to keywords associated with locale.
85
-
86
- Returns:
87
-
88
- ApiResponse
89
-
90
- """
91
- return self._request(kwargs.pop('path'), params=kwargs)
92
-
93
- @sp_endpoint('/v2/sp/keywords', method='GET')
94
- @Utils.deprecated
95
- def list_keywords(self, **kwargs) -> ApiResponse:
96
- r"""
97
- list_keywords(self, **kwargs) -> ApiResponse
98
-
99
- Gets a list of keywords.
100
-
101
- query **startIndex**:*integer* | Optional. 0-indexed record offset for the result set. Default value : 0
102
-
103
- query **count**:*integer* | Optional. Number of records to include in the paged response. Defaults to max page size.
104
-
105
- query **matchTypeFilter**:*string* | Optional. Restricts results to keywords with match types within the specified comma-separated list.. Available values : broad, phrase, exact.
106
-
107
- query **keywordText**:*string* | Optional. Restricts results to keywords that match the specified text exactly.
108
-
109
- query **stateFilter**:*string* | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
110
-
111
- query **campaignIdFilter**:*string* | Optional. A comma-delimited list of campaign identifiers.
112
-
113
- query **adGroupIdFilter**:*string* | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
114
-
115
- query **keywordIdFilter**:*string* | Optional. Restricts results to keywords associated with campaigns specified by identifier in the comma-delimited list..
116
-
117
- query **locale**:*string* | Optional. Restricts results to keywords associated with locale.
118
-
119
- Returns:
120
-
121
- ApiResponse
122
-
123
- """
124
- return self._request(kwargs.pop('path'), params=kwargs)
125
-
126
- @sp_endpoint('/v2/sp/keywords', method='POST')
127
- @Utils.deprecated
128
- def create_keywords(self, **kwargs) -> ApiResponse:
129
- r"""
130
- create_keywords(self, **kwargs) -> ApiResponse:
131
-
132
- Creates one or more keywords.
133
-
134
- body: | REQUIRED {'description': 'An array of keyword objects.}'
135
-
136
- | '**campaignId**': *number*, {'description': 'The identifer of the campaign to which the keyword is associated.'}
137
- | '**adGroupId**': *number*, {'description': 'The identifier of the ad group to which this keyword is associated.'}
138
- | '**state**': *string*, {'description': 'The current resource state.' , 'Enum': '[ enabled, paused, archived ]'}
139
- | '**keywordText**': *string*, {'description': 'The keyword text.'}
140
- | '**nativeLanguageKeyword**': *string*, {'description': 'The unlocalized keyword text in the preferred locale of the advertiser.'}
141
- | '**nativeLanguageLocale**': *string*, {'description': 'The locale preference of the advertiser.'}
142
- | '**matchType**': *string*, {'description': 'The type of match.' , 'Enum': '[ exact, phrase, broad ]'}
143
- | '**bid**': *number($float)* {'description': 'Bid associated with this keyword. Applicable to biddable match types only.'}
144
-
145
- Returns:
146
-
147
- ApiResponse
148
-
149
-
150
- """
151
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
152
-
153
- @sp_endpoint('/v2/sp/keywords', method='PUT')
154
- @Utils.deprecated
155
- def edit_keywords(self, **kwargs) -> ApiResponse:
156
- r"""
157
- edit_keywords(self, **kwargs) -> ApiResponse:
158
-
159
- Updates one or more keywords.
160
-
161
- body: | REQUIRED {'description': 'An array of keyword objects.}'
162
-
163
- | '**keywordId**': *number*, {'description': 'The identifer of the campaign to which the keyword is associated.'}
164
- | '**state**': *string*, {'description': 'The current resource state.' , 'Enum': '[ enabled, paused, archived ]'}
165
- | '**bid**': *number($float)* {'description': 'Bid associated with this keyword. Applicable to biddable match types only.'}
166
-
167
- Returns:
168
-
169
- ApiResponse
170
-
171
- """
172
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
@@ -1,164 +0,0 @@
1
- from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
2
-
3
-
4
- class NegativeKeywords(Client):
5
- @sp_endpoint('/v2/sp/negativeKeywords/{}', method='GET')
6
- @Utils.deprecated
7
- def get_negative_keyword(self, keywordId, **kwargs) -> ApiResponse:
8
- r"""
9
-
10
- get_negative_keyword(self, keywordId, \*\*kwargs) -> ApiResponse
11
-
12
- Gets a campaign negative keyword specified by identifier.
13
-
14
- path **keywordId**:*number* | Required. The identifier of an existing keyword.
15
-
16
-
17
- Returns:
18
-
19
- ApiResponse
20
-
21
- """
22
- return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs)
23
-
24
- @sp_endpoint('/v2/sp/negativeKeywords/{}', method='DELETE')
25
- @Utils.deprecated
26
- def delete_negative_keyword(self, keywordId, **kwargs) -> ApiResponse:
27
- r"""
28
-
29
- delete_negative_keyword(self, keywordId, \*\*kwargs) -> ApiResponse
30
-
31
- Archives a campaign negative keyword.
32
-
33
- path **keywordId**:*number* | Required. The identifier of an existing keyword.
34
-
35
-
36
- Returns:
37
-
38
- ApiResponse
39
-
40
- """
41
- return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs)
42
-
43
- @sp_endpoint('/v2/sp/negativeKeywords/extended/{}', method='GET')
44
- @Utils.deprecated
45
- def get_negative_keyword_extended(self, keywordId, **kwargs) -> ApiResponse:
46
- r"""
47
-
48
- get_negative_keyword_extended(self, keywordId, \*\*kwargs) -> ApiResponse
49
-
50
- Gets a campaign negative keyword that has extended data fields.
51
-
52
- path **keywordId**:*number* | Required. The identifier of an existing keyword.
53
-
54
- Returns:
55
-
56
- ApiResponse
57
-
58
- """
59
- return self._request(fill_query_params(kwargs.pop('path'), keywordId), params=kwargs)
60
-
61
- @sp_endpoint('/v2/sp/negativeKeywords/extended', method='GET')
62
- @Utils.deprecated
63
- def list_negative_keywords_extended(self, **kwargs) -> ApiResponse:
64
- r"""
65
- list_negative_keywords_extended(self, \*\*kwargs) -> ApiResponse
66
-
67
- Gets a list of negative keywords that have extended data fields.
68
-
69
- query **startIndex**:*integer* | Optional. 0-indexed record offset for the result set. Default value : 0
70
-
71
- query **count**:*integer* | Optional. Number of records to include in the paged response. Defaults to max page size.
72
-
73
- query **matchTypeFilter**:*string* | Optional. Restricts results to keywords with match types within the specified comma-separated list. Available values : negativePhrase, negativeExact.
74
-
75
- query **keywordText**:*string* | Optional. Restricts results to keywords that match the specified text exactly.
76
-
77
- query **stateFilter**:*string* | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, archived.
78
-
79
- query **campaignIdFilter**:*string* | Optional. A comma-delimited list of campaign identifiers.
80
-
81
- query **adGroupIdFilter**:*string* | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
82
-
83
- query **keywordIdFilter**:*string* | Optional. Restricts results to keywords associated with campaigns specified by identifier in the comma-delimited list.
84
-
85
- Returns:
86
-
87
- ApiResponse
88
-
89
- """
90
- return self._request(kwargs.pop('path'), params=kwargs)
91
-
92
- @sp_endpoint('/v2/sp/negativeKeywords', method='GET')
93
- @Utils.deprecated
94
- def list_negative_keywords(self, **kwargs) -> ApiResponse:
95
- r"""
96
- list_negative_keywords(self, \*\*kwargs) -> ApiResponse
97
-
98
- Gets a list of negative keyword objects.
99
-
100
- query **startIndex**:*integer* | Optional. 0-indexed record offset for the result set. Default value : 0
101
-
102
- query **count**:*integer* | Optional. Number of records to include in the paged response. Defaults to max page size.
103
-
104
- query **matchTypeFilter**:*string* | Optional. Restricts results to keywords with match types within the specified comma-separated list. Available values : negativePhrase, negativeExact.
105
-
106
- query **keywordText**:*string* | Optional. Restricts results to keywords that match the specified text exactly.
107
-
108
- query **stateFilter**:*string* | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, archived.
109
-
110
- query **campaignIdFilter**:*string* | Optional. A comma-delimited list of campaign identifiers.
111
-
112
- query **adGroupIdFilter**:*string* | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
113
-
114
- query **keywordIdFilter**:*string* | Optional. Restricts results to keywords associated with campaigns specified by identifier in the comma-delimited list..
115
-
116
- Returns:
117
-
118
- ApiResponse
119
-
120
- """
121
- return self._request(kwargs.pop('path'), params=kwargs)
122
-
123
- @sp_endpoint('/v2/sp/negativeKeywords', method='POST')
124
- @Utils.deprecated
125
- def create_negative_keywords(self, **kwargs) -> ApiResponse:
126
- r"""
127
- create_negative_keywords(self, \*\*kwargs) -> ApiResponse:
128
-
129
- Creates one or more campaign negative keywords.
130
-
131
- body: | REQUIRED {'description': 'An array of keyword objects.}'
132
-
133
- | '**campaignId**': *number*, {'description': 'The identifer of the campaign to which the keyword is associated.'}
134
- | '**adGroupId**': *number*, {'description': 'The identifier of the ad group to which this keyword is associated.'}
135
- | '**state**': *string*, {'description': 'The current resource state.' , 'Enum': '[ enabled ]'}
136
- | '**keywordText**': *string*, {'description': 'The text of the expression to match against a search query.'}
137
- | '**matchType**': *string*, {'description': 'The type of match.' , 'Enum': '[ negativeExact, negativePhrase ]'}
138
-
139
- Returns:
140
-
141
- ApiResponse
142
-
143
- """
144
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
145
-
146
- @sp_endpoint('/v2/sp/negativeKeywords', method='PUT')
147
- @Utils.deprecated
148
- def edit_negative_keywords(self, **kwargs) -> ApiResponse:
149
- r"""
150
- edit_negative_keywords(self, \*\*kwargs) -> ApiResponse:
151
-
152
- Updates one or more campaign negative keywords.
153
-
154
- body: | REQUIRED {'description': 'An array of campaign negative keywords with updated values.'}
155
-
156
- | '**keywordId**': *number*, {'description': 'The identifer of the campaign to which the keyword is associated.'}
157
- | '**state**': *string*, {'description': 'The current resource state.' , 'Enum': '[ enabled, paused, archived ]'}
158
-
159
- Returns:
160
-
161
- ApiResponse
162
-
163
- """
164
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
@@ -1,163 +0,0 @@
1
- from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
2
-
3
-
4
- class NegativeTargets(Client):
5
- @sp_endpoint('/v2/sp/negativeTargets', method='POST')
6
- @Utils.deprecated
7
- def create_negative_targets(self, **kwargs) -> ApiResponse:
8
- r"""
9
- create_products_targets(self, \*\*kwargs) -> ApiResponse:
10
-
11
- Creates one or more targeting expressions.
12
-
13
- body: | REQUIRED {'description': 'An array of asins objects.}'
14
-
15
- | '**campaignId**': *number*, {'description': 'The identifier of the campaign to which this negative target is associated.'}
16
- | '**adGroupId**': *number*, {'description': 'The identifier of the ad group to which this negative target is associated.'}
17
- | '**state**': *number*, {'description': 'The current resource state. [ enabled, paused, archived ]'}
18
- | '**expression**'
19
- | '**value**': *string*, {'description': 'The expression value. '}
20
- | '**type**': *string*, {'description': '[ queryBroadMatches, queryPhraseMatches, queryExactMatches, asinCategorySameAs, asinBrandSameAs, asinPriceLessThan, asinPriceBetween, asinPriceGreaterThan, asinReviewRatingLessThan, asinReviewRatingBetween, asinReviewRatingGreaterThan, asinSameAs, queryBroadRelMatches, queryHighRelMatches, asinSubstituteRelated, asinAccessoryRelated, asinAgeRangeSameAs, asinGenreSameAs, asinIsPrimeShippingEligible ]'}
21
- | '**expressionType**': *string*, {'description': '[ auto, manual ]'}
22
-
23
- Returns:
24
-
25
- ApiResponse
26
-
27
-
28
- """
29
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
30
-
31
- @sp_endpoint('/v2/sp/negativeTargets', method='PUT')
32
- @Utils.deprecated
33
- def edit_negative_targets(self, **kwargs) -> ApiResponse:
34
- r"""
35
- edit_negative_targets(self, \*\*kwargs) -> ApiResponse:
36
-
37
- Updates one or more negative targeting clauses.
38
-
39
- body: | REQUIRED {'description': 'An array of asins objects.}'
40
-
41
- | '**campaignId**': *number*, {'description': 'The identifier of the campaign to which this negative target is associated.'}
42
- | '**adGroupId**': *number*, {'description': 'The identifier of the ad group to which this negative target is associated.'}
43
- | '**state**': *number*, {'description': 'The current resource state. [ enabled, paused, archived ]'}
44
- | '**expression**'
45
- | '**value**': *string*, {'description': 'The expression value. '}
46
- | '**type**': *string*, {'description': '[ queryBroadMatches, queryPhraseMatches, queryExactMatches, asinCategorySameAs, asinBrandSameAs, asinPriceLessThan, asinPriceBetween, asinPriceGreaterThan, asinReviewRatingLessThan, asinReviewRatingBetween, asinReviewRatingGreaterThan, asinSameAs, queryBroadRelMatches, queryHighRelMatches, asinSubstituteRelated, asinAccessoryRelated, asinAgeRangeSameAs, asinGenreSameAs, asinIsPrimeShippingEligible ]'}
47
- | '**expressionType**': *string*, {'description': '[ auto, manual ]'}
48
-
49
- Returns:
50
-
51
- ApiResponse
52
-
53
-
54
- """
55
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
56
-
57
- @sp_endpoint('/v2/sp/negativeTargets', method='GET')
58
- @Utils.deprecated
59
- def list_negative_targets(self, **kwargs) -> ApiResponse:
60
- r"""
61
- list_negative_targets(self, \*\*kwargs) -> ApiResponse
62
-
63
- Gets a list of negative targeting clauses filtered by specified criteria.
64
-
65
- query **startIndex**:*integer* | Optional. 0-indexed record offset for the result set. Default value : 0
66
-
67
- query **count**:*integer* | Optional. Number of records to include in the paged response. Defaults to max page size.
68
-
69
- query **stateFilter**:*string* | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
70
-
71
- query **campaignIdFilter**:*string* | Optional. A comma-delimited list of campaign identifiers.
72
-
73
- query **adGroupIdFilter**:*string* | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
74
-
75
- query **targetIdFilter**:*string* | Optional. A comma-delimited list of target identifiers.
76
-
77
- Returns:
78
-
79
- ApiResponse
80
-
81
- """
82
- return self._request(kwargs.pop('path'), params=kwargs)
83
-
84
- @sp_endpoint('/v2/sp/negativeTargets/{}', method='GET')
85
- @Utils.deprecated
86
- def get_negative_target(self, targetId, **kwargs) -> ApiResponse:
87
- r"""
88
-
89
- get_negative_targets(self, targetId, \*\*kwargs) -> ApiResponse
90
-
91
- Get a negative targeting clause specified by identifier.
92
-
93
- path **targetId**:*number* | Required. The target identifier.
94
-
95
- Returns:
96
-
97
- ApiResponse
98
-
99
- """
100
- return self._request(fill_query_params(kwargs.pop('path'), targetId), params=kwargs)
101
-
102
- @sp_endpoint('/v2/sp/negativeTargets/{}', method='DELETE')
103
- @Utils.deprecated
104
- def delete_negative_targets(self, targetId, **kwargs) -> ApiResponse:
105
- r"""
106
-
107
- delete_negative_targets(self, targetId, \*\*kwargs) -> ApiResponse
108
-
109
- Archives a negative targeting clause.
110
-
111
- path **targetId**:*number* | Required. The target identifier.
112
-
113
- Returns:
114
-
115
- ApiResponse
116
-
117
- """
118
- return self._request(fill_query_params(kwargs.pop('path'), targetId), params=kwargs)
119
-
120
- @sp_endpoint('/v2/sp/negativeTargets/extended', method='GET')
121
- @Utils.deprecated
122
- def list_negative_targets_extended(self, **kwargs) -> ApiResponse:
123
- r"""
124
- list_negative_targets_extended(self, \*\*kwargs) -> ApiResponse
125
-
126
- Gets a list of negative targeting clauses filtered by specified criteria.
127
-
128
- query **startIndex**:*integer* | Optional. 0-indexed record offset for the result set. Default value : 0
129
-
130
- query **count**:*integer* | Optional. Number of records to include in the paged response. Defaults to max page size.
131
-
132
- query **stateFilter**:*string* | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
133
-
134
- query **campaignIdFilter**:*string* | Optional. A comma-delimited list of campaign identifiers.
135
-
136
- query **adGroupIdFilter**:*string* | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
137
-
138
- query **targetIdFilter**:*string* | Optional. A comma-delimited list of target identifiers.
139
-
140
- Returns:
141
-
142
- ApiResponse
143
-
144
- """
145
- return self._request(kwargs.pop('path'), params=kwargs)
146
-
147
- @sp_endpoint('/v2/sp/negativeTargets/extended/{}', method='GET')
148
- @Utils.deprecated
149
- def get_negative_target_extended(self, targetId, **kwargs) -> ApiResponse:
150
- r"""
151
-
152
- get_negative_target_extended(self, targetId, \*\*kwargs) -> ApiResponse
153
-
154
- Get a negative targeting clause specified by identifier.
155
-
156
- path **targetId**:*number* | Required. The target identifier.
157
-
158
- Returns:
159
-
160
- ApiResponse
161
-
162
- """
163
- return self._request(fill_query_params(kwargs.pop('path'), targetId), params=kwargs)
@@ -1,154 +0,0 @@
1
- from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse, Utils
2
-
3
-
4
- class ProductAds(Client):
5
- @sp_endpoint('/v2/sp/productAds', method='GET')
6
- @Utils.deprecated
7
- def list_product_ads(self, **kwargs) -> ApiResponse:
8
- r"""
9
- list_product_ads(self, \*\*kwargs) -> ApiResponse
10
-
11
- Gets an array of campaigns.
12
-
13
- query **startIndex**:*integer* | Optional. 0-indexed record offset for the result set. Default value : 0
14
-
15
- query **count**:*integer* | Optional. Number of records to include in the paged response. Defaults to max page size.
16
-
17
- query **stateFilter**:*string* | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
18
-
19
- query **campaignIdFilter**:*string* | Optional. A comma-delimited list of campaign identifiers.
20
-
21
- query **adGroupIdFilter**:*string* | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
22
-
23
- query **adIdFilter**:*string* | Optional. Restricts results to product ads associated with the product ad identifiers specified in the comma-delimited list.
24
-
25
- Returns:
26
-
27
- ApiResponse
28
-
29
- """
30
- return self._request(kwargs.pop('path'), params=kwargs)
31
-
32
- @sp_endpoint('/v2/sp/productAds/extended', method='GET')
33
- @Utils.deprecated
34
- def list_product_ads_extended(self, **kwargs) -> ApiResponse:
35
- r"""
36
- list_product_ads_extended_request(self, \*\*kwargs) -> ApiResponse
37
-
38
- Gets extended data for a list of product ads filtered by specified criteria.
39
-
40
- query **startIndex**:*integer* | Optional. 0-indexed record offset for the result set. Default value : 0
41
-
42
- query **count**:*integer* | Optional. Number of records to include in the paged response. Defaults to max page size.
43
-
44
- query **stateFilter**:*string* | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
45
-
46
- query **campaignIdFilter**:*string* | Optional. A comma-delimited list of campaign identifiers.
47
-
48
- query **adGroupIdFilter**:*string* | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
49
-
50
- query **adIdFilter**:*string* | Optional. Restricts results to product ads associated with the product ad identifiers specified in the comma-delimited list.
51
-
52
- Returns:
53
-
54
- ApiResponse
55
-
56
- """
57
- return self._request(kwargs.pop('path'), params=kwargs)
58
-
59
- @sp_endpoint('/v2/sp/productAds/{}', method='GET')
60
- @Utils.deprecated
61
- def get_product_ad(self, adId, **kwargs) -> ApiResponse:
62
- r"""
63
-
64
- get_product_ad_request(self, adId, \*\*kwargs) -> ApiResponse
65
-
66
- Gets a product ad specified by identifier.
67
-
68
- path **adId**:*number* | Required. A product ad identifier.
69
-
70
- Returns:
71
-
72
- ApiResponse
73
-
74
- """
75
- return self._request(fill_query_params(kwargs.pop('path'), adId), params=kwargs)
76
-
77
- @sp_endpoint('/v2/sp/productAds/extended/{}', method='GET')
78
- @Utils.deprecated
79
- def get_product_ad_extended(self, adId, **kwargs) -> ApiResponse:
80
- r"""
81
-
82
- get_product_ad_extended(self, adId, **kwargs) -> ApiResponse
83
-
84
- Gets extended data for a product ad specified by identifier.
85
-
86
- path **adId**:*number* | Required. A product ad identifier.
87
-
88
- Returns:
89
-
90
- ApiResponse
91
-
92
- """
93
- return self._request(fill_query_params(kwargs.pop('path'), adId), params=kwargs)
94
-
95
- @sp_endpoint('/v2/sp/productAds/{}', method='DELETE')
96
- @Utils.deprecated
97
- def delete_product_ad(self, adId, **kwargs) -> ApiResponse:
98
- r"""
99
-
100
- delete_product_ad(self, adId, \*\*kwargs) -> ApiResponse
101
-
102
- Sets the state of a specified product ad to archived. Note that once the state is set to archived it cannot be changed.
103
-
104
- path **adId**:*number* | Required. A product ad identifier.
105
-
106
- Returns:
107
-
108
- ApiResponse
109
-
110
- """
111
- return self._request(fill_query_params(kwargs.pop('path'), adId), params=kwargs)
112
-
113
- @sp_endpoint('/v2/sp/productAds', method='PUT')
114
- @Utils.deprecated
115
- def edit_product_ads(self, **kwargs) -> ApiResponse:
116
- r"""
117
- edit_product_ads(self, \*\*kwargs) -> ApiResponse
118
-
119
- Updates one or more product ads specified by identifier.
120
-
121
- body: | REQUIRED {'description': 'A list of product ad objects with updated values for the state field.}'
122
-
123
- | '**adId**': *number*, {'description': 'The identifier of an existing campaign to update.'}
124
- | '**state**': *string*, {'description': 'The current resource state.', 'Enum': '[ enabled, paused, archived ]'}
125
-
126
- Returns:
127
-
128
- ApiResponse
129
-
130
- """
131
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)
132
-
133
- @sp_endpoint('/v2/sp/productAds', method='POST')
134
- @Utils.deprecated
135
- def create_product_ads(self, **kwargs) -> ApiResponse:
136
- r"""
137
- create_product_ads(self, \*\*kwargs) -> ApiResponse
138
-
139
- Creates one or more product ads.
140
-
141
- body: | REQUIRED {'description': 'A list of product ads for creation. Note that the SKU field is used by sellers and the ASIN field is used by vendors.'}
142
-
143
- | '**campaignId**': *number*, {'description': 'The campaign identifier.'}
144
- | '**adGroupId**': *number*, {'description': 'The ad group identifier.'}
145
- | '**sku**': *string*, {'description': 'The SKU associated with the product. Defined for seller accounts only.'}
146
- | '**asin**': *string*, {'description': 'The ASIN associated with the product. Defined for vendors only.'}
147
- | '**state**': *string*, {'description': 'The current resource state.', 'Enum': '[ enabled, paused, archived ]'}
148
-
149
- Returns:
150
-
151
- ApiResponse
152
-
153
- """
154
- return self._request(kwargs.pop('path'), data=Utils.convert_body(kwargs.pop('body'), False), params=kwargs)