lazyad 0.0.26__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.26
3
+ Version: 0.0.27
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -325,6 +325,9 @@ def update_ad_batch(
325
325
  promotion_id: int = None,
326
326
  promotion_ids: list = None,
327
327
 
328
+ campaign_feed_id: int = None,
329
+ campaign_feed_ids: list = None,
330
+
328
331
  operate: str = "disable",
329
332
 
330
333
  end_point: str = None,
@@ -358,13 +361,24 @@ def update_ad_batch(
358
361
  return
359
362
 
360
363
  elif media_type == "baidu":
361
- url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
362
- if not adgroup_feed_ids:
363
- adgroup_feed_ids = [adgroup_feed_id]
364
- post_data = {
365
- "adgroup_feed_ids": adgroup_feed_ids,
366
- "opt_status": operate
367
- }
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
368
382
  elif media_type == "toutiao_upgrade":
369
383
  url = "https://cli2.mobgi.com/Toutiao/Promotion/updateStatus"
370
384
  if promotion_id and not promotion_ids:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.26
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.26",
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