lazyad 0.0.73__tar.gz → 0.0.75__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.73
3
+ Version: 0.0.75
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -1170,6 +1170,92 @@ def MainPanelReport_AdReport_getReport(
1170
1170
  )
1171
1171
 
1172
1172
 
1173
+ def MainPanelReport_AccountReport_getReport(
1174
+ cookie: str,
1175
+ media_type: str,
1176
+ sort_field: str,
1177
+ media_account_id: int = None,
1178
+ page: int = 1,
1179
+ page_size: int = 20,
1180
+ start_date: str = None,
1181
+ end_date: str = None,
1182
+ sort_direction: str = "desc",
1183
+ data_type: str = "list",
1184
+ conditions: dict = None,
1185
+ cdt_start_date: str = None,
1186
+ cdt_end_date: str = None,
1187
+ kpis: list = None,
1188
+ req_source: str = None,
1189
+
1190
+ base_infos: list = None,
1191
+ search_field: str = None,
1192
+ search_keyword: str = None,
1193
+ time_line: str = None,
1194
+
1195
+ scheme: str = "https",
1196
+ host: str = default_host,
1197
+ filename: str = "/MainPanelReport/AccountReport/getReport"
1198
+ ):
1199
+ """
1200
+ 推广-广告管理-账户
1201
+ :param cookie:
1202
+ :param media_type:
1203
+ :param media_account_id:
1204
+ :param sort_field: 排序字段
1205
+ :param page:
1206
+ :param page_size:
1207
+ :param start_date: 数据开始日期
1208
+ :param end_date: 数据结束日期
1209
+ :param sort_direction: 排序方式,desc:降序
1210
+ :param data_type:
1211
+ :param conditions: 搜索条件
1212
+ :param cdt_start_date: 创建开始时间
1213
+ :param cdt_end_date: 创建结束时间
1214
+ :param kpis:
1215
+ :param req_source: 腾讯需要的参数
1216
+ :return:
1217
+ """
1218
+ url = f"{scheme}://{host}{filename}"
1219
+ data = dict()
1220
+
1221
+ # 默认参数
1222
+ if base_infos:
1223
+ data["base_infos"] = base_infos
1224
+ if conditions:
1225
+ data["conditions"] = conditions
1226
+ if data_type:
1227
+ data["data_type"] = data_type
1228
+ if end_date:
1229
+ data["end_date"] = end_date
1230
+ if kpis:
1231
+ data["kpis"] = kpis
1232
+ if media_type:
1233
+ data["media_type"] = media_type
1234
+ if page:
1235
+ data["page"] = page
1236
+ if page_size:
1237
+ data["page_size"] = page_size
1238
+ if sort_direction:
1239
+ data["sort_direction"] = sort_direction
1240
+ if sort_field:
1241
+ data["sort_field"] = sort_field
1242
+ if start_date:
1243
+ data["start_date"] = start_date
1244
+ if time_line:
1245
+ data["time_line"] = time_line
1246
+ if req_source:
1247
+ data["req_source"] = req_source
1248
+
1249
+ headers = copy.deepcopy(default_headers)
1250
+ headers["Cookie"] = cookie
1251
+ return lazyrequests.lazy_requests(
1252
+ method="POST",
1253
+ url=url,
1254
+ json=data,
1255
+ headers=headers
1256
+ )
1257
+
1258
+
1173
1259
  def Advertiser_getRealAdvertiserData(
1174
1260
  cookie: str,
1175
1261
  start_date: str = None,
@@ -1211,3 +1297,72 @@ def Advertiser_getRealAdvertiserData(
1211
1297
  json=data,
1212
1298
  headers=headers
1213
1299
  )
1300
+
1301
+
1302
+ def Project_getList(
1303
+ cookie: str,
1304
+ sort_field: str,
1305
+ start_date: str = None,
1306
+ end_date: str = None,
1307
+ media_account_ids: list = None,
1308
+ conditions: str = None,
1309
+ data_type: str = "list",
1310
+ page: int = 1,
1311
+ page_size: int = 20,
1312
+ sort_direction: str = "desc",
1313
+ total_count: int = None,
1314
+ total_page: int = None,
1315
+
1316
+ scheme: str = "https",
1317
+ host: str = default_host,
1318
+ filename: str = "/Toutiao/Project/getList"
1319
+ ):
1320
+ """
1321
+ 推广-广告管理-项目
1322
+ :param cookie:
1323
+ :param start_date: 数据开始日期
1324
+ :param end_date: 数据结束日期
1325
+ :return:
1326
+ """
1327
+ url = f"{scheme}://{host}{filename}"
1328
+ if not start_date:
1329
+ start_date = lazytime.get_date_string(days=0)
1330
+ if not end_date:
1331
+ end_date = lazytime.get_date_string(days=0)
1332
+
1333
+ if not conditions and media_account_ids:
1334
+ conditions_list = list()
1335
+ for each_media_account_id in media_account_ids:
1336
+ conditions_list.append({"media_account_id": str(each_media_account_id)})
1337
+ conditions = json.dumps(conditions_list)
1338
+
1339
+ data = dict()
1340
+ if conditions:
1341
+ data["conditions"] = conditions
1342
+ if data_type:
1343
+ data["data_type"] = data_type
1344
+ if start_date:
1345
+ data["start_date"] = start_date
1346
+ if end_date:
1347
+ data["end_date"] = end_date
1348
+ if page:
1349
+ data["page"] = page
1350
+ if page_size:
1351
+ data["page_size"] = page_size
1352
+ if sort_direction:
1353
+ data["sort_direction"] = sort_direction
1354
+ if sort_field:
1355
+ data["sort_field"] = sort_field
1356
+ if total_count:
1357
+ data["total_count"] = total_count
1358
+ if total_page:
1359
+ data["total_page"] = total_page
1360
+
1361
+ headers = copy.deepcopy(default_headers)
1362
+ headers["Cookie"] = cookie
1363
+ return lazyrequests.lazy_requests(
1364
+ method="POST",
1365
+ url=url,
1366
+ json=data,
1367
+ headers=headers
1368
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.73
3
+ Version: 0.0.75
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.73",
16
+ version="0.0.75",
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
File without changes