logos-sdk 0.0.25.dev15__tar.gz → 0.0.25.dev17__tar.gz
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.
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/PKG-INFO +1 -1
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/GoogleAds.py +7 -9
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/MerchantCenter.py +98 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/MicrosoftAdvertising.py +8 -3
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk.egg-info/PKG-INFO +1 -1
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/LICENSE +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/README.md +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/__init__.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/big_query/BigQuery.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/big_query/__init__.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/logging/LogosLogger.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/logging/__init__.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/CampaignManager.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/Collabim.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/DV360.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/Facebook.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/GoogleSheets.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/MarketMiner.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/Sklik.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/__init__.py +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk.egg-info/SOURCES.txt +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk.egg-info/dependency_links.txt +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk.egg-info/requires.txt +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk.egg-info/top_level.txt +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/setup.cfg +0 -0
- {logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/setup.py +0 -0
|
@@ -111,20 +111,18 @@ class GoogleAdsService:
|
|
|
111
111
|
yield service_response["data"]["results"]
|
|
112
112
|
|
|
113
113
|
def exclude_criterion_for_account(
|
|
114
|
-
self,
|
|
115
|
-
) ->
|
|
114
|
+
self, account_id: str, placements: List[Dict], secret_id: str = None
|
|
115
|
+
) -> List[Dict]:
|
|
116
116
|
"""
|
|
117
117
|
Excludes list of unwanted urls/YouTube channels for account with client_id
|
|
118
|
-
:param
|
|
119
|
-
:param
|
|
120
|
-
:param mode: Union(placement, youtube)
|
|
118
|
+
:param account_id: Google Ads id without -
|
|
119
|
+
:param placements: list of records {value :negative urls/YouTube channels, type: placement type}
|
|
121
120
|
:param secret_id: id of the secret
|
|
122
|
-
:return:
|
|
121
|
+
:return: list of resource names
|
|
123
122
|
"""
|
|
124
123
|
body = {
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"mode": mode,
|
|
124
|
+
"account_id": account_id,
|
|
125
|
+
"placements": placements,
|
|
128
126
|
"secret_id": secret_id,
|
|
129
127
|
}
|
|
130
128
|
|
|
@@ -20,6 +20,7 @@ class MerchantCenterService:
|
|
|
20
20
|
self._LIST_PRODUCTS = self._URL + "/product-service/products"
|
|
21
21
|
self._LIST_PRODUCT_STATUSES = self._URL + "/product-service/product-statuses"
|
|
22
22
|
self._REPORTS_SEARCH = self._URL + "/reports-search"
|
|
23
|
+
self._GET_SUPPLEMENTAL_FEEDS = self._URL + "/feed-service/supplemental-feeds"
|
|
23
24
|
|
|
24
25
|
def list_accounts(self, merchant_account_id: str, secret_id: str):
|
|
25
26
|
"""
|
|
@@ -224,3 +225,100 @@ class MerchantCenterService:
|
|
|
224
225
|
return service_response["data"]
|
|
225
226
|
else:
|
|
226
227
|
raise MerchantServiceException(response.content)
|
|
228
|
+
|
|
229
|
+
def get_supplemental_feeds(self, secret_id: str, merchant_account_id: str) -> bool:
|
|
230
|
+
"""
|
|
231
|
+
Gets list of supplemental feeds
|
|
232
|
+
:param secret_id: The ID of the secret in secret manager
|
|
233
|
+
:param merchant_account_id: The ID of the account in Microsoft Advertising
|
|
234
|
+
:return: List of supplemental feeds
|
|
235
|
+
"""
|
|
236
|
+
body = {"secret_id": secret_id, "merchant_account_id": merchant_account_id}
|
|
237
|
+
header = get_headers(self._GET_SUPPLEMENTAL_FEEDS)
|
|
238
|
+
response = self.session.request(
|
|
239
|
+
"post", url=self._GET_SUPPLEMENTAL_FEEDS, json=body, headers=header
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
if response.status_code == HTTPStatus.OK:
|
|
243
|
+
service_response = response.json()
|
|
244
|
+
return service_response["data"]
|
|
245
|
+
else:
|
|
246
|
+
raise MerchantServiceException(response.content)
|
|
247
|
+
|
|
248
|
+
def create_supplemental_feed(
|
|
249
|
+
self, secret_id: str, merchant_account_id: str, display_name: str
|
|
250
|
+
) -> bool:
|
|
251
|
+
"""
|
|
252
|
+
Creates a supplemental feed
|
|
253
|
+
:param secret_id: The ID of the secret in secret manager
|
|
254
|
+
:param merchant_account_id: The ID of the account in Microsoft Advertising
|
|
255
|
+
:param display_name: The display name of the feed to be created
|
|
256
|
+
:return: The newly created supplemental feed
|
|
257
|
+
"""
|
|
258
|
+
body = {
|
|
259
|
+
"secret_id": secret_id,
|
|
260
|
+
"merchant_account_id": merchant_account_id,
|
|
261
|
+
"display_name": display_name,
|
|
262
|
+
}
|
|
263
|
+
header = get_headers(self._GET_SUPPLEMENTAL_FEEDS)
|
|
264
|
+
response = self.session.request(
|
|
265
|
+
"post", url=self._GET_SUPPLEMENTAL_FEEDS, json=body, headers=header
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
if response.status_code == HTTPStatus.OK:
|
|
269
|
+
service_response = response.json()
|
|
270
|
+
return service_response["data"]
|
|
271
|
+
else:
|
|
272
|
+
raise MerchantServiceException(response.content)
|
|
273
|
+
|
|
274
|
+
def delete_supplemental_feed(
|
|
275
|
+
self, secret_id: str, merchant_account_id: str, feed_id: str
|
|
276
|
+
) -> bool:
|
|
277
|
+
"""
|
|
278
|
+
Deletes a supplemental feed by it id
|
|
279
|
+
:param secret_id: The ID of the secret in secret manager
|
|
280
|
+
:param merchant_account_id: The ID of the account in Microsoft Advertising
|
|
281
|
+
:param feed_id: The ID of the supplemental feed to be deleted
|
|
282
|
+
:return: Status of the operation
|
|
283
|
+
"""
|
|
284
|
+
body = {
|
|
285
|
+
"secret_id": secret_id,
|
|
286
|
+
"merchant_account_id": merchant_account_id,
|
|
287
|
+
"feed_id": feed_id,
|
|
288
|
+
}
|
|
289
|
+
header = get_headers(self._GET_SUPPLEMENTAL_FEEDS)
|
|
290
|
+
response = self.session.request(
|
|
291
|
+
"delete", url=self._GET_SUPPLEMENTAL_FEEDS, json=body, headers=header
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
if response.status_code == HTTPStatus.OK:
|
|
295
|
+
service_response = response.json()
|
|
296
|
+
return service_response["data"]
|
|
297
|
+
else:
|
|
298
|
+
raise MerchantServiceException(response.content)
|
|
299
|
+
|
|
300
|
+
def batch_update_products_in_supplemental_feeds(
|
|
301
|
+
self, secret_id: str, merchant_account_id: str, products
|
|
302
|
+
) -> bool:
|
|
303
|
+
"""
|
|
304
|
+
Creates a batch for update of products via supplemental feeds
|
|
305
|
+
:param secret_id: The ID of the secret in secret manager
|
|
306
|
+
:param merchant_account_id: The ID of the account in Microsoft Advertising
|
|
307
|
+
:param products: The products to be updated
|
|
308
|
+
:return: The result of each batch operation
|
|
309
|
+
"""
|
|
310
|
+
body = {
|
|
311
|
+
"secret_id": secret_id,
|
|
312
|
+
"merchant_account_id": merchant_account_id,
|
|
313
|
+
"products": products,
|
|
314
|
+
}
|
|
315
|
+
header = get_headers(self._GET_SUPPLEMENTAL_FEEDS)
|
|
316
|
+
response = self.session.request(
|
|
317
|
+
"put", url=self._GET_SUPPLEMENTAL_FEEDS, json=body, headers=header
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
if response.status_code == HTTPStatus.OK:
|
|
321
|
+
service_response = response.json()
|
|
322
|
+
return service_response["data"]
|
|
323
|
+
else:
|
|
324
|
+
raise MerchantServiceException(response.content)
|
{logos_sdk-0.0.25.dev15 → logos_sdk-0.0.25.dev17}/logos_sdk/services/MicrosoftAdvertising.py
RENAMED
|
@@ -39,7 +39,9 @@ class MicrosoftAdvertising:
|
|
|
39
39
|
)
|
|
40
40
|
self._GET_BUDGET_SUMMARY_REPORT = self._URL + "/budget-summary-report"
|
|
41
41
|
self._GET_SHARE_OF_VOICE_REPORT = self._URL + "/share-of-voice-report"
|
|
42
|
-
self._GET_SEARCH_CAMPAIGNS_CHANGE_HISTORY_REPORT =
|
|
42
|
+
self._GET_SEARCH_CAMPAIGNS_CHANGE_HISTORY_REPORT = (
|
|
43
|
+
self._URL + "/search-campaigns-change-history-report"
|
|
44
|
+
)
|
|
43
45
|
|
|
44
46
|
def get_destination_url_report(
|
|
45
47
|
self,
|
|
@@ -285,7 +287,7 @@ class MicrosoftAdvertising:
|
|
|
285
287
|
secret_id: str,
|
|
286
288
|
date_from: str,
|
|
287
289
|
date_to: str,
|
|
288
|
-
report_columns: List[str]
|
|
290
|
+
report_columns: List[str],
|
|
289
291
|
):
|
|
290
292
|
"""
|
|
291
293
|
Calls endpoint for getting search campaigns change history
|
|
@@ -307,7 +309,10 @@ class MicrosoftAdvertising:
|
|
|
307
309
|
|
|
308
310
|
header = get_headers(self._GET_SEARCH_CAMPAIGNS_CHANGE_HISTORY_REPORT)
|
|
309
311
|
response = self.session.request(
|
|
310
|
-
"post",
|
|
312
|
+
"post",
|
|
313
|
+
url=self._GET_SEARCH_CAMPAIGNS_CHANGE_HISTORY_REPORT,
|
|
314
|
+
json=body,
|
|
315
|
+
headers=header,
|
|
311
316
|
)
|
|
312
317
|
|
|
313
318
|
if response.status_code == HTTPStatus.OK:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|