server启动之后,填入callback
This commit is contained in:
@@ -39,6 +39,22 @@ def revoke_msg():
|
||||
|
||||
print(response.text)
|
||||
|
||||
def set_call_back():
|
||||
|
||||
url = "/tools/setCallback"
|
||||
|
||||
payload = json.dumps({
|
||||
"token": "cb43f52db27e4a56bb6ec7da54373582",
|
||||
"callbackUrl": "http://192.168.2.210:8999/gewechat/message/callback"
|
||||
})
|
||||
headers = {
|
||||
'X-GEWE-TOKEN': 'cb43f52db27e4a56bb6ec7da54373582',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
response = requests.request("POST",base_url+ url, headers=headers, data=payload)
|
||||
|
||||
print(response.text)
|
||||
|
||||
if __name__ == '__main__':
|
||||
get_chatroom_members()
|
||||
set_call_back()
|
||||
|
||||
17
gewechat/client/set_call_back.py
Normal file
17
gewechat/client/set_call_back.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "/tools/setCallback"
|
||||
|
||||
payload = json.dumps({
|
||||
"token": "{{gewe-token}}",
|
||||
"callbackUrl": "http://www.baidu.com"
|
||||
})
|
||||
headers = {
|
||||
'X-GEWE-TOKEN': '{{gewe-token}}',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
|
||||
print(response.text)
|
||||
8
main.py
8
main.py
@@ -52,10 +52,10 @@ def main(chat_type: int):
|
||||
#
|
||||
# # 秀人网每天自动发pdf
|
||||
# robot.onEveryTime("17:30", robot.xiu_ren_pdf_send)
|
||||
time.sleep(5)
|
||||
# 启动之后,填入callback
|
||||
gewe_client.client_set_callback()
|
||||
# 返回启动的端口,以便调用者知道实际使用的端口
|
||||
# time.sleep(5)
|
||||
# # 启动之后,填入callback
|
||||
# gewe_client.client_set_callback()
|
||||
# # 返回启动的端口,以便调用者知道实际使用的端口
|
||||
# 启动Dashboard服务器
|
||||
dashboard_server = None
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user