sc-common-interface 2.8.6__tar.gz → 2.8.7__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.8.6 → sc_common_interface-2.8.7}/PKG-INFO +1 -1
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/LiveCommonInterface.py +11 -4
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/PostCommonInterface.py +10 -8
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/setup.py +1 -1
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/CommonOa.py +0 -0
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/McCommonInterface.py +0 -0
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/Platform.py +0 -0
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/__init__.py +0 -0
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/setup.cfg +0 -0
{sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -2442,18 +2442,25 @@ def add_product_to_live(data):
|
|
|
2442
2442
|
return response
|
|
2443
2443
|
|
|
2444
2444
|
|
|
2445
|
+
def get_merchant_currency(data):
|
|
2446
|
+
env = data["env"]
|
|
2447
|
+
headers = data["headers"]
|
|
2445
2448
|
|
|
2446
2449
|
|
|
2447
2450
|
|
|
2448
2451
|
|
|
2449
2452
|
|
|
2450
2453
|
|
|
2454
|
+
if __name__=="__main__":
|
|
2455
|
+
from PostCommonInterface import *
|
|
2451
2456
|
|
|
2457
|
+
data = {'env': 'https://front-admin-preview.shoplineapp.com', 'headers': {'Content-Type': 'application/json',
|
|
2458
|
+
'authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkZmQxYjNiMDc0M2JmYWU4YTFkODk4NzczNjgyZWVkZCIsImRhdGEiOnsibWVyY2hhbnRfaWQiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAiLCJhcHBsaWNhdGlvbl9pZCI6IjVlYjkwMzVhYjA5ZDEyNjU4NTFmOTU2ZiJ9LCJpc3MiOiJodHRwczovL2RldmVsb3BlcnMtcHJldmlldy5zaG9wbGluZWFwcC5jb20iLCJhdWQiOltdLCJzdWIiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAifQ.Y90xLfYVAp9yByHo7Vc7A3hHrp6hX9X9Lg4mg_WiE_I',
|
|
2459
|
+
'lang': 'en'}, 'sales_id': '552980'
|
|
2460
|
+
}
|
|
2461
|
+
__, response = get_comment_user(data)
|
|
2462
|
+
print(response)
|
|
2452
2463
|
|
|
2453
|
-
if __name__=="__main__":
|
|
2454
|
-
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': '95828', 'keyword': ['test关键字组件直播间新增的关键字1739955629'], 'product_id': '65bba57da79d260023ac30ff'}
|
|
2455
|
-
res = add_product_to_live(data)
|
|
2456
|
-
print(res)
|
|
2457
2464
|
|
|
2458
2465
|
|
|
2459
2466
|
|
{sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/PostCommonInterface.py
RENAMED
|
@@ -877,12 +877,13 @@ def get_comment_user(data):
|
|
|
877
877
|
env = data["env"]
|
|
878
878
|
headers = data["headers"]
|
|
879
879
|
sales_id = data["sales_id"]
|
|
880
|
-
params = {"pageNo":1,"pageSize":
|
|
880
|
+
params = {"pageNo":1,"pageSize":25,"salesId":sales_id}
|
|
881
881
|
if "query" in data:
|
|
882
882
|
query = data["query"]
|
|
883
883
|
params["query"] = query
|
|
884
884
|
url = "%s/api/posts/post/comments"%env
|
|
885
885
|
response = requests.get(url, headers=headers,params=params).json()
|
|
886
|
+
print(response)
|
|
886
887
|
post_user_id = jsonpath(response, "$..id")[0]
|
|
887
888
|
return post_user_id,response
|
|
888
889
|
|
|
@@ -916,7 +917,7 @@ def post_edit_cart(data):
|
|
|
916
917
|
def search_customer(data):
|
|
917
918
|
env = data["env"]
|
|
918
919
|
headers = data["headers"]
|
|
919
|
-
phone = data["
|
|
920
|
+
phone = data["phone"]
|
|
920
921
|
url = "%s/openApi/proxy/v1/customers/search?query=%s&per_page=50&search_fields[]=mobile_phone" \
|
|
921
922
|
"&search_fields[]=phones" % (env, phone)
|
|
922
923
|
response = requests.get(url, headers=headers).json()
|
|
@@ -925,7 +926,7 @@ def search_customer(data):
|
|
|
925
926
|
def merge_customer(data):
|
|
926
927
|
env = data["env"]
|
|
927
928
|
headers = data["headers"]
|
|
928
|
-
phone = data["
|
|
929
|
+
phone = data["phone"]
|
|
929
930
|
__, response = get_comment_user(data)
|
|
930
931
|
# print("留言面板查询返回",response)
|
|
931
932
|
name = data["name"]
|
|
@@ -974,8 +975,7 @@ def manual_order(data):
|
|
|
974
975
|
env = data["env"]
|
|
975
976
|
headers = data["headers"]
|
|
976
977
|
phone = "18776343453"
|
|
977
|
-
|
|
978
|
-
phone = data["query"]
|
|
978
|
+
phone = data.get("phone",phone)
|
|
979
979
|
__, response = get_comment_user(data)
|
|
980
980
|
name = jsonpath(response, "$..name")[0]
|
|
981
981
|
user_id = jsonpath(response, "$..psid")[0]
|
|
@@ -983,7 +983,7 @@ def manual_order(data):
|
|
|
983
983
|
data["name"] = name
|
|
984
984
|
data["user_id"] = user_id
|
|
985
985
|
data["page_id"] = page_id
|
|
986
|
-
data["
|
|
986
|
+
data["phone"] = phone
|
|
987
987
|
platform = "facebook"
|
|
988
988
|
if "platform" in data:
|
|
989
989
|
platform = data["platform"].upper()
|
|
@@ -1044,7 +1044,7 @@ def manual_order(data):
|
|
|
1044
1044
|
"source_data": {"type": "fb", "source_id": page_id}, "customer_phone_country_code": "86",
|
|
1045
1045
|
"postcode": postcode}
|
|
1046
1046
|
res = requests.post(url,headers=headers,json=body)
|
|
1047
|
-
|
|
1047
|
+
print("创建订单返回",res.text)
|
|
1048
1048
|
#获取订单ID
|
|
1049
1049
|
orderNumber = ""
|
|
1050
1050
|
if res.status_code==200:
|
|
@@ -1721,6 +1721,8 @@ def edit_message(data):
|
|
|
1721
1721
|
|
|
1722
1722
|
|
|
1723
1723
|
if __name__=="__main__":
|
|
1724
|
-
|
|
1724
|
+
data = {'env': 'https://front-admin-preview.shoplineapp.com', 'headers': {'Content-Type': 'application/json', 'authorization': 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJkZmQxYjNiMDc0M2JmYWU4YTFkODk4NzczNjgyZWVkZCIsImRhdGEiOnsibWVyY2hhbnRfaWQiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAiLCJhcHBsaWNhdGlvbl9pZCI6IjVlYjkwMzVhYjA5ZDEyNjU4NTFmOTU2ZiJ9LCJpc3MiOiJodHRwczovL2RldmVsb3BlcnMtcHJldmlldy5zaG9wbGluZWFwcC5jb20iLCJhdWQiOltdLCJzdWIiOiI2MWE4N2M5NzYzYjcwYzAwNTEwNmZiZDAifQ.Y90xLfYVAp9yByHo7Vc7A3hHrp6hX9X9Lg4mg_WiE_I', 'lang': 'en'}, 'sales_id': 553386, 'platform': 'FACEBOOK', 'prize_type': 'product', 'key': '5e3bba98882fc0fb22a0607238bc5b8f', 'type': 'activity'}
|
|
1725
|
+
orderNumber, customer_id, res = manual_order(data)
|
|
1726
|
+
print(orderNumber)
|
|
1725
1727
|
|
|
1726
1728
|
|
|
File without changes
|
{sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc_common_interface-2.8.6 → sc_common_interface-2.8.7}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|