doc:更新文档

This commit is contained in:
hugy 2023-07-31 16:18:05 +08:00
parent 1718ddefdd
commit 13f182a95b
2 changed files with 116 additions and 0 deletions

View File

@ -985,6 +985,92 @@ enableHttp=0时使用ipport的tcp服务回传消息。
``` javascript ``` 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 ``` javascript

View File

@ -274,6 +274,36 @@ def createChatRoom():
response = requests.request("POST", url, headers=headers, data=payload) response = requests.request("POST", url, headers=headers, data=payload)
print(response.text) 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__': if __name__ == '__main__':
checkLogin() checkLogin()