sc-common-interface 2.8.7__tar.gz → 2.8.9__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.7 → sc_common_interface-2.8.9}/PKG-INFO +1 -1
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/CommonOa.py +2 -3
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/LiveCommonInterface.py +9 -11
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/PostCommonInterface.py +2 -4
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/setup.py +1 -1
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/McCommonInterface.py +0 -0
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/Platform.py +0 -0
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/__init__.py +0 -0
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/setup.cfg +0 -0
{sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -8,7 +8,7 @@ import random
|
|
|
8
8
|
import hmac
|
|
9
9
|
from hashlib import sha1
|
|
10
10
|
import random
|
|
11
|
-
from datetime import
|
|
11
|
+
from datetime import *
|
|
12
12
|
|
|
13
13
|
def delete_post(data):
|
|
14
14
|
env = data["env"]
|
|
@@ -167,6 +167,7 @@ def delate_activity(data):
|
|
|
167
167
|
headers = data["headers"]
|
|
168
168
|
activity_id = data["activity_id"]
|
|
169
169
|
url = "%s/api/activity/%s" % (env, activity_id)
|
|
170
|
+
time.sleep(5)
|
|
170
171
|
response = requests.delete(url,headers=headers).json()
|
|
171
172
|
return response
|
|
172
173
|
|
|
@@ -531,7 +532,7 @@ def get_broadcast_list(data):
|
|
|
531
532
|
pageNum = 1
|
|
532
533
|
pageSize = 12
|
|
533
534
|
pageNum =data.get("pageNum",pageNum)
|
|
534
|
-
|
|
535
|
+
pageSize = data.get("pageSize", pageSize)
|
|
535
536
|
name = data.get("name",name)
|
|
536
537
|
if "name" in data:
|
|
537
538
|
name= data["name"]
|
|
@@ -544,6 +545,7 @@ def get_broadcast_list(data):
|
|
|
544
545
|
"pageNum": pageNum,
|
|
545
546
|
"pageSize": pageSize
|
|
546
547
|
}
|
|
548
|
+
# print(body)
|
|
547
549
|
reponse = requests.post(url,headers=headers,json=body).json()
|
|
548
550
|
if name !="":
|
|
549
551
|
name_list = jsonpath(reponse,"$..name")
|
|
@@ -948,7 +950,7 @@ def get_stamp_time(data):
|
|
|
948
950
|
now = datetime.now()
|
|
949
951
|
if time_type not in {"add", "sub"}:
|
|
950
952
|
raise ValueError("Invalid time_type. Use 'add' or 'sub'.")
|
|
951
|
-
stamp_time = now +
|
|
953
|
+
stamp_time = now + timedelta(**{unit:num if time_type == "add" else -num})
|
|
952
954
|
return int(stamp_time.timestamp()*1000)
|
|
953
955
|
|
|
954
956
|
def get_line_info(data):
|
|
@@ -2452,14 +2454,10 @@ def get_merchant_currency(data):
|
|
|
2452
2454
|
|
|
2453
2455
|
|
|
2454
2456
|
if __name__=="__main__":
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
'lang': 'en'}, 'sales_id': '552980'
|
|
2460
|
-
}
|
|
2461
|
-
__, response = get_comment_user(data)
|
|
2462
|
-
print(response)
|
|
2457
|
+
stamp1 = get_stamp_time({"num":5040})
|
|
2458
|
+
print(stamp1)
|
|
2459
|
+
stamp2 = get_stamp_time({"num": 5041})
|
|
2460
|
+
print(stamp2)
|
|
2463
2461
|
|
|
2464
2462
|
|
|
2465
2463
|
|
{sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/PostCommonInterface.py
RENAMED
|
@@ -1068,6 +1068,7 @@ def get_user_conversation_id(data):
|
|
|
1068
1068
|
# param = {"type":"facebook","user_id":vars["user_id"],"party_channel_id":vars["platform_channel_id"]}
|
|
1069
1069
|
print(url)
|
|
1070
1070
|
response = requests.get(url, headers=headers).json()
|
|
1071
|
+
print(response)
|
|
1071
1072
|
|
|
1072
1073
|
conversation_id = jsonpath(response, "$.data.id")[0]
|
|
1073
1074
|
return conversation_id,response
|
|
@@ -1721,8 +1722,5 @@ def edit_message(data):
|
|
|
1721
1722
|
|
|
1722
1723
|
|
|
1723
1724
|
if __name__=="__main__":
|
|
1724
|
-
|
|
1725
|
-
orderNumber, customer_id, res = manual_order(data)
|
|
1726
|
-
print(orderNumber)
|
|
1727
|
-
|
|
1725
|
+
pass
|
|
1728
1726
|
|
{sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface/McCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc_common_interface-2.8.7 → sc_common_interface-2.8.9}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|