sc-common-interface 2.0.4__tar.gz → 2.0.5__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.
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/PKG-INFO +1 -1
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface/PostCommonInterface.py +20 -6
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/setup.py +1 -1
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/setup.cfg +0 -0
{sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface/PostCommonInterface.py
RENAMED
|
@@ -330,14 +330,15 @@ def get_page_post(data):
|
|
|
330
330
|
"""
|
|
331
331
|
env = data["env"]
|
|
332
332
|
headers = data["headers"]
|
|
333
|
+
platform = "FACEBOOK"
|
|
334
|
+
if "platform" in data:
|
|
335
|
+
platform = data["platform"].upper()
|
|
333
336
|
if "page_id" in data:
|
|
334
337
|
page_id = data["page_id"]
|
|
335
338
|
else:
|
|
336
339
|
page_id, page_name, group_id = get_channel_info(data)
|
|
337
|
-
if
|
|
338
|
-
|
|
339
|
-
if platform=="FB_GROUP":
|
|
340
|
-
page_id = group_id
|
|
340
|
+
if platform=="FB_GROUP":
|
|
341
|
+
page_id = group_id
|
|
341
342
|
type = "POST"
|
|
342
343
|
if "type" in data:
|
|
343
344
|
type = data["type"]
|
|
@@ -347,7 +348,7 @@ def get_page_post(data):
|
|
|
347
348
|
page_size = 50
|
|
348
349
|
if "page_size" in data:
|
|
349
350
|
page_size = data
|
|
350
|
-
params = {"page_size":page_size,"type":type,"since":since,"party_channel_id":page_id}
|
|
351
|
+
params = {"page_size":page_size,"type":type,"since":since,"party_channel_id":page_id,"platform":platform}
|
|
351
352
|
url = "%s/api/posts/post"%env
|
|
352
353
|
response =requests.get(url,headers=headers,params=params).json()
|
|
353
354
|
return response
|
|
@@ -367,6 +368,7 @@ def relate_post(data):
|
|
|
367
368
|
response = get_page_post(data)
|
|
368
369
|
available_post_list = []
|
|
369
370
|
related_sales = jsonpath(response,"$..related_sales")
|
|
371
|
+
print("查询到的贴文信息",related_sales)
|
|
370
372
|
for index,value in enumerate(related_sales):
|
|
371
373
|
if value==False:
|
|
372
374
|
available_post_list.append(response["data"]["data"][index])
|
|
@@ -1172,9 +1174,21 @@ def copy_post(data):
|
|
|
1172
1174
|
sales_id = response["data"]["id"]
|
|
1173
1175
|
return sales_id,response
|
|
1174
1176
|
|
|
1177
|
+
def end_post(data):
|
|
1178
|
+
"""
|
|
1179
|
+
手动结束贴文
|
|
1180
|
+
:param data:
|
|
1181
|
+
:return:
|
|
1182
|
+
"""
|
|
1183
|
+
env = data["env"]
|
|
1184
|
+
headers = data["headers"]
|
|
1185
|
+
sales_id = data["sales_id"]
|
|
1186
|
+
url = "%s/api/posts/post/sales/disconnectPost/%s"%(env,sales_id)
|
|
1187
|
+
response = requests.post(url,headers=headers).json()
|
|
1188
|
+
return response
|
|
1175
1189
|
|
|
1176
1190
|
|
|
1177
1191
|
|
|
1178
1192
|
|
|
1179
1193
|
if __name__=="__main__":
|
|
1180
|
-
|
|
1194
|
+
pass
|
|
File without changes
|
{sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.0.4 → sc-common-interface-2.0.5}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|