sc-common-interface 2.6.7__tar.gz → 2.6.8__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.6.7 → sc-common-interface-2.6.8}/PKG-INFO +1 -1
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface/LiveCommonInterface.py +14 -12
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/setup.py +1 -1
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface/McCommonInterface.py +0 -0
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/setup.cfg +0 -0
{sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -42,14 +42,17 @@ def delete_relate_post(data):
|
|
|
42
42
|
# print("response",response)
|
|
43
43
|
sales_data = response["data"]["list"]
|
|
44
44
|
# print("sales_data",sales_data)
|
|
45
|
-
status = [1,2]
|
|
45
|
+
status = [1,2,4]
|
|
46
|
+
if sales_type.lower()=="post":
|
|
47
|
+
status = [0,1,2]
|
|
46
48
|
if "status" in data:
|
|
47
49
|
status = data["status"]
|
|
48
50
|
for i in sales_data:
|
|
49
51
|
platforms = i["platforms"]
|
|
50
52
|
post_sale_status = i["post_sale_status"]
|
|
51
53
|
live_sdk = i["live_sdk"]
|
|
52
|
-
|
|
54
|
+
related_post = i["related_post"]
|
|
55
|
+
if (platforms==[platform.upper()] or live_sdk==platform.upper()) and related_post==True and post_sale_status in status :
|
|
53
56
|
sales_id = i["id"]
|
|
54
57
|
data["sales_id"] = sales_id
|
|
55
58
|
# print(sales_id)
|
|
@@ -265,6 +268,7 @@ def send__live_comment(data):
|
|
|
265
268
|
if "-" in post_id:
|
|
266
269
|
post_id = post_id.split("_")[-1]
|
|
267
270
|
else:
|
|
271
|
+
print("----")
|
|
268
272
|
relationUrl = data["relationUrl"]
|
|
269
273
|
match = re.search(r'groups/(\d+)/posts/(\d+)/', relationUrl)
|
|
270
274
|
group_id = match.group(1)
|
|
@@ -1301,7 +1305,7 @@ def edit_live_info(data):
|
|
|
1301
1305
|
}
|
|
1302
1306
|
}
|
|
1303
1307
|
}
|
|
1304
|
-
print(body)
|
|
1308
|
+
# print(body)
|
|
1305
1309
|
response = requests.put(url, headers=headers, json=body).json()
|
|
1306
1310
|
return response
|
|
1307
1311
|
|
|
@@ -1997,17 +2001,15 @@ def add_all_product_set_to_keyword(data):
|
|
|
1997
2001
|
|
|
1998
2002
|
if __name__=="__main__":
|
|
1999
2003
|
from sc_common_interface.PostCommonInterface import *
|
|
2000
|
-
data = {'env': 'https://front-admin-preview.shoplineapp.com', 'headers': {'Content-Type': 'application/json', 'authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkZmQxYjNiMDc0M2JmYWU4YTFkODk4NzczNjgyZWVkZCIsImRhdGEiOnsibWVyY2hhbnRfaWQiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAiLCJhcHBsaWNhdGlvbl9pZCI6IjVlYjkwMzVhYjA5ZDEyNjU4NTFmOTU2ZiJ9LCJpc3MiOiJodHRwczovL2RldmVsb3BlcnMtcHJldmlldy5zaG9wbGluZWFwcC5jb20iLCJhdWQiOltdLCJzdWIiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAifQ.Y90xLfYVAp9yByHo7Vc7A3hHrp6hX9X9Lg4mg_WiE_I', 'lang': 'en'}, 'platform': 'FB_GROUP', 'page_id': '106411048594439', 'relationUrl': 'https://www.facebook.com/groups/3592205981019493/posts/
|
|
2001
|
-
|
|
2002
|
-
print(data)
|
|
2003
|
-
delete_relate_post(data)
|
|
2004
|
+
data = {'env': 'https://front-admin-preview.shoplineapp.com', 'headers': {'Content-Type': 'application/json', 'authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkZmQxYjNiMDc0M2JmYWU4YTFkODk4NzczNjgyZWVkZCIsImRhdGEiOnsibWVyY2hhbnRfaWQiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAiLCJhcHBsaWNhdGlvbl9pZCI6IjVlYjkwMzVhYjA5ZDEyNjU4NTFmOTU2ZiJ9LCJpc3MiOiJodHRwczovL2RldmVsb3BlcnMtcHJldmlldy5zaG9wbGluZWFwcC5jb20iLCJhdWQiOltdLCJzdWIiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAifQ.Y90xLfYVAp9yByHo7Vc7A3hHrp6hX9X9Lg4mg_WiE_I', 'lang': 'en'}, 'platform': 'FB_GROUP', 'sales_id': 542794, 'page_id': '106411048594439', 'relationUrl': 'https://www.facebook.com/groups/3592205981019493/posts/3871576623082426/', 'post_id': ['https://www.facebook.com/groups/3592205981019493/posts/3871576623082426/', 'https://www.facebook.com/groups/3592205981019493/posts/3871571433082945/', 'https://www.facebook.com/groups/3592205981019493/posts/3872673686306053/']}
|
|
2005
|
+
sales_id= create_live(data)
|
|
2004
2006
|
data["sales_id"] = sales_id
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
data["
|
|
2008
|
-
modelone_create_single_product(data)
|
|
2007
|
+
delete_relate_post(data)
|
|
2008
|
+
add_live(data)
|
|
2009
|
+
data["key"] = "5e3bba98882fc0fb22a0607238bc5b8f"
|
|
2009
2010
|
del data["post_id"]
|
|
2010
|
-
|
|
2011
|
+
send__live_comment(data)
|
|
2012
|
+
|
|
2011
2013
|
|
|
2012
2014
|
|
|
2013
2015
|
|
{sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.6.7 → sc-common-interface-2.6.8}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|