diff --git a/doc/3.9.5.81.md b/doc/3.9.5.81.md index b0fcce6..f335d5e 100644 --- a/doc/3.9.5.81.md +++ b/doc/3.9.5.81.md @@ -985,6 +985,92 @@ enableHttp=0时,使用ip,port的tcp服务回传消息。 ``` javascript +``` +响应: +``` javascript +{ + "code": 1, + "data": null, + "msg": "success" +} +``` + +#### 20.退群** +###### 接口功能 +> 退群 + +###### 接口地址 +> [/api/quitChatRoom](/api/quitChatRoom) + +###### HTTP请求方式 +> POST JSON + +###### 请求参数 +|参数|必选|类型|说明| +|---|---|---|---| +|chatRoomId|string|群id| + + +###### 返回字段 +|返回字段|字段类型|说明 | +|---|---|---| +|code|int|返回状态,大于0成功, -1失败| +|msg|string|成功提示| +|data|object|null| + + +###### 接口示例 + +入参: +``` javascript +{ + "chatRoomId":"123456@chatroom" +} + +``` +响应: +``` javascript +{ + "code": 119536579329, + "data": null, + "msg": "success" +} +``` + +#### 21.转发消息** +###### 接口功能 +> 转发消息 + +###### 接口地址 +> [/api/forwardMsg](/api/forwardMsg) + +###### HTTP请求方式 +> POST JSON + +###### 请求参数 +|参数|必选|类型|说明| +|---|---|---|---| +|wxid|string|接收人id| +|msgId|string|消息id| + + +###### 返回字段 +|返回字段|字段类型|说明 | +|---|---|---| +|code|int|返回状态,1成功, -1失败| +|msg|string|成功提示| +|data|object|null| + + +###### 接口示例 + +入参: +``` javascript +{ + "wxid":"filehelper", + "msgId":"1233312233123" +} + ``` 响应: ``` javascript diff --git a/python/3.9.5.81/http_client.py b/python/3.9.5.81/http_client.py index df84819..dc2317b 100644 --- a/python/3.9.5.81/http_client.py +++ b/python/3.9.5.81/http_client.py @@ -274,6 +274,36 @@ def createChatRoom(): response = requests.request("POST", url, headers=headers, data=payload) print(response.text) +def quitChatRoom(): + print("modify chatRoomId ") + raise RuntimeError("modify chatRoomId then deleted me") + url = "127.0.0.1:19088/api/quitChatRoom" + + payload = json.dumps({ + "chatRoomId": "123@chatroom" + }) + headers = { + 'Content-Type': 'application/json' + } + + response = requests.request("POST", url, headers=headers, data=payload) + print(response.text) + +def forwardMsg(): + print("modify msgId ") + raise RuntimeError("modify msgId then deleted me") + url = "127.0.0.1:19088/api/forwardMsg" + + payload = json.dumps({ + "wxid": "filehelper", + "msgId": "12331" + }) + headers = { + 'Content-Type': 'application/json' + } + response = requests.request("POST", url, headers=headers, data=payload) + print(response.text) + if __name__ == '__main__': checkLogin()