lazyad 0.0.25__tar.gz → 0.0.27__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.

Potentially problematic release.


This version of lazyad might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.25
3
+ Version: 0.0.27
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -321,6 +321,13 @@ def update_ad_batch(
321
321
  campaign_ids: list = None,
322
322
  adgroup_feed_id: int = None,
323
323
  adgroup_feed_ids: list = None,
324
+
325
+ promotion_id: int = None,
326
+ promotion_ids: list = None,
327
+
328
+ campaign_feed_id: int = None,
329
+ campaign_feed_ids: list = None,
330
+
324
331
  operate: str = "disable",
325
332
 
326
333
  end_point: str = None,
@@ -354,11 +361,30 @@ def update_ad_batch(
354
361
  return
355
362
 
356
363
  elif media_type == "baidu":
357
- url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
358
- if not adgroup_feed_ids:
359
- adgroup_feed_ids = [adgroup_feed_id]
364
+ if not adgroup_feed_id or not adgroup_feed_ids:
365
+ url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
366
+ if adgroup_feed_id and not adgroup_feed_ids:
367
+ adgroup_feed_ids = [adgroup_feed_id]
368
+ post_data = {
369
+ "adgroup_feed_ids": adgroup_feed_ids,
370
+ "opt_status": operate
371
+ }
372
+ elif not campaign_feed_id or not campaign_feed_ids:
373
+ url = "https://cli2.mobgi.com/Baidu/Campaign/batchUpdate"
374
+ if campaign_feed_id and not campaign_feed_ids:
375
+ campaign_feed_ids = [campaign_feed_id]
376
+ post_data = {
377
+ "campaign_feed_ids": campaign_feed_ids,
378
+ "opt_status": operate
379
+ }
380
+ else:
381
+ return
382
+ elif media_type == "toutiao_upgrade":
383
+ url = "https://cli2.mobgi.com/Toutiao/Promotion/updateStatus"
384
+ if promotion_id and not promotion_ids:
385
+ promotion_ids = [promotion_id]
360
386
  post_data = {
361
- "adgroup_feed_ids": adgroup_feed_ids,
387
+ "promotion_ids": promotion_ids,
362
388
  "opt_status": operate
363
389
  }
364
390
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.25
3
+ Version: 0.0.27
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -13,7 +13,7 @@ with open("README.md", "r", encoding='utf-8') as fh:
13
13
 
14
14
  setuptools.setup(
15
15
  name="lazyad",
16
- version="0.0.25",
16
+ version="0.0.27",
17
17
  description="基于Python的懒人包-适用于广告投放模块",
18
18
  long_description=long_description,
19
19
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes