sc-common-interface 2.3.2__tar.gz → 2.3.3__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.3.2 → sc-common-interface-2.3.3}/PKG-INFO +1 -1
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface/LiveCommonInterface.py +23 -11
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface.egg-info/PKG-INFO +1 -1
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/setup.py +1 -1
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface/Platform.py +0 -0
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface/PostCommonInterface.py +0 -0
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface/__init__.py +0 -0
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface.egg-info/SOURCES.txt +0 -0
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface.egg-info/dependency_links.txt +0 -0
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface.egg-info/requires.txt +0 -0
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface.egg-info/top_level.txt +0 -0
- {sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/setup.cfg +0 -0
{sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface/LiveCommonInterface.py
RENAMED
|
@@ -88,16 +88,22 @@ def send__live_comment(data):
|
|
|
88
88
|
keyword = "接口测试普通留言"
|
|
89
89
|
if "keyword" in data:
|
|
90
90
|
keyword = data['keyword']
|
|
91
|
-
body = {
|
|
92
|
-
if platform == "FACEBOOK":
|
|
93
|
-
body = {"object": "page", "entry": [{"id": page_id, "time": stamp, "changes": [{"field": "feed", "value": {
|
|
91
|
+
body = {"object": "page", "entry": [{"id": page_id, "time": stamp, "changes": [{"field": "feed", "value": {
|
|
94
92
|
"from": {"id": user_id, "name": name},
|
|
95
93
|
"post": {"status_type": "added_video", "is_published": True, "updated_time": "2022-11-18T09:57:26+0000",
|
|
96
94
|
"permalink_url": "https://www.facebook.com/permalink.php?story_fbid=pfbid02jLK3e6YdFSXp2DmD7j7vtStLXoBzTi8rxKrp6jFhVMUTTEgz6qvZA8soR9Uwydd8l&id=107977035056574",
|
|
97
95
|
"promotion_status": "inactive", "id": post_id}, "message": keyword, "item": "comment",
|
|
98
96
|
"verb": "add", "post_id": post_id, "comment_id": comment_id,
|
|
99
97
|
"created_time": stamp, "parent_id": post_id}}]}]}
|
|
100
|
-
|
|
98
|
+
# if platform == "FACEBOOK":
|
|
99
|
+
# body = {"object": "page", "entry": [{"id": page_id, "time": stamp, "changes": [{"field": "feed", "value": {
|
|
100
|
+
# "from": {"id": user_id, "name": name},
|
|
101
|
+
# "post": {"status_type": "added_video", "is_published": True, "updated_time": "2022-11-18T09:57:26+0000",
|
|
102
|
+
# "permalink_url": "https://www.facebook.com/permalink.php?story_fbid=pfbid02jLK3e6YdFSXp2DmD7j7vtStLXoBzTi8rxKrp6jFhVMUTTEgz6qvZA8soR9Uwydd8l&id=107977035056574",
|
|
103
|
+
# "promotion_status": "inactive", "id": post_id}, "message": keyword, "item": "comment",
|
|
104
|
+
# "verb": "add", "post_id": post_id, "comment_id": comment_id,
|
|
105
|
+
# "created_time": stamp, "parent_id": post_id}}]}]}
|
|
106
|
+
if platform == "INSTAGRAM":
|
|
101
107
|
body = {"entry": [{"id": page_id, "time": stamp, "changes": [{"value": {"from": {"id": user_id,
|
|
102
108
|
"username": name},
|
|
103
109
|
"media": {"id": post_id,
|
|
@@ -139,12 +145,18 @@ def send_mc_message(data):
|
|
|
139
145
|
i = platform_list.index(platform)
|
|
140
146
|
page_id = info["data"]["relatedPostList"][i]["page_id"]
|
|
141
147
|
platform = info["data"]["relatedPostList"][i]["platform"]
|
|
142
|
-
body = {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
+
body = {"entry": [{"id": "%s" % page_id, "messaging": [{"message":
|
|
149
|
+
{
|
|
150
|
+
"mid": "m_hhAqPhSlMTY4En2oWjSB59T3BFjeU97DdDV4WHr3DLWnPrO0iCsjQlG3hBN%d-sBlT26-6oNg" % stamp,
|
|
151
|
+
"text": "%s" % message},
|
|
152
|
+
"recipient": {"id": "%s" % page_id},
|
|
153
|
+
"sender": {"id": "%s" % user_id}, "timestamp": stamp}],
|
|
154
|
+
"time": stamp}], "object": "page"}
|
|
155
|
+
# if platform.upper()=="FACEBOOK":
|
|
156
|
+
# body = {"entry":[{"id":"%s"%page_id,"messaging":[{"message":
|
|
157
|
+
# {"mid":"m_hhAqPhSlMTY4En2oWjSB59T3BFjeU97DdDV4WHr3DLWnPrO0iCsjQlG3hBN%d-sBlT26-6oNg"%stamp,"text":"%s"%message},
|
|
158
|
+
# "recipient":{"id":"%s"%page_id},"sender":{"id":"%s"%user_id},"timestamp":stamp}],"time":stamp}],"object":"page"}
|
|
159
|
+
if platform.upper()=="INSTAGRAM":
|
|
148
160
|
body={"object":"instagram","entry":[{"time":stamp,"id":"%s"%page_id,"messaging":[{"sender":{"id":"%s"%user_id},"recipient":{"id":"%s"%page_id},
|
|
149
161
|
"timestamp":stamp,"message":{"mid":"aWdfZAG1faXRlbToxOklHTWVzc2FnZAUlEOjE3ODQxNDUwMzgwODgwNTMzOjM0MDI4MjM2Njg0MTcxMDMwMTI0NDI3NjAyNDExMzcwMDc2NTA5MDozMTgzODU0Mzg3NTY4MDYwMTE3ODUxOTE2MD%d"%stamp,"text":"%s"%message}}]}]}
|
|
150
162
|
url = "%s/facebook/webhook" % env
|
|
@@ -347,7 +359,7 @@ def get_broadcast_list(data):
|
|
|
347
359
|
for i,value in enumerate(name_list):
|
|
348
360
|
if value==name:
|
|
349
361
|
broadcast_id =broadcast_id_list[i]
|
|
350
|
-
return broadcast_id,
|
|
362
|
+
return broadcast_id,reponse
|
|
351
363
|
|
|
352
364
|
def get_broadcast_detail(data):
|
|
353
365
|
env = data["env"]
|
|
File without changes
|
{sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface/PostCommonInterface.py
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface.egg-info/requires.txt
RENAMED
|
File without changes
|
{sc-common-interface-2.3.2 → sc-common-interface-2.3.3}/sc_common_interface.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|