lazyad 0.0.60__tar.gz → 0.0.61__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.60
3
+ Version: 0.0.61
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -319,3 +319,59 @@ def xml_to_dict(xml_str):
319
319
  for row in rows[1:]
320
320
  ]
321
321
  return data_list
322
+
323
+
324
+ def history(
325
+ cookie: str,
326
+ page: int = 1,
327
+ page_size: int = 50,
328
+ timezone: int = 8,
329
+ start_time: str = None,
330
+ end_time: str = None,
331
+ objective_type: str = "adv_offer",
332
+ objective: list = None,
333
+ operator: list = None,
334
+ operation: list = None,
335
+ feature: list = None
336
+ ):
337
+ """
338
+ 获取 操作日志
339
+ 需要登录:{'code': 400, 'msg': 'Please login first', 'data': None}
340
+ 验证成功:{'code': 200, 'msg': 'success', 'data': {}
341
+ """
342
+ scheme = "https"
343
+ host = "ss-api.mintegral.com"
344
+ filename = "api/v1/history/index"
345
+ if not start_time:
346
+ start_time = lazytime.get_datetime_relative(days=-7)
347
+ if not end_time:
348
+ end_time = lazytime.get_datetime_relative(days=1)
349
+ if not objective:
350
+ objective = []
351
+ if not operator:
352
+ operator = []
353
+ if not operation:
354
+ operation = []
355
+ if not feature:
356
+ feature = []
357
+ data = {
358
+ "limit": page_size,
359
+ "page": page,
360
+ "timezone": str(timezone),
361
+ "start_time": start_time,
362
+ "end_time": end_time,
363
+ "objective_type": objective_type,
364
+ "objective": objective,
365
+ "operator": operator,
366
+ "operation": operation,
367
+ "feature": feature
368
+ }
369
+ url = f"{scheme}://{host}{filename}"
370
+ headers = copy.deepcopy(default_headers)
371
+ headers["Cookie"] = cookie
372
+ return lazyrequests.lazy_requests(
373
+ method="POST",
374
+ data=data,
375
+ url=url,
376
+ headers=headers
377
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.60
3
+ Version: 0.0.61
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.60",
16
+ version="0.0.61",
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
File without changes
File without changes