Skip to content

Commit

Permalink
doc:更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
ttttupup committed Jul 31, 2023
1 parent 64ba600 commit 9b4d326
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 0 deletions.
86 changes: 86 additions & 0 deletions doc/3.9.5.81.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 30 additions & 0 deletions python/3.9.5.81/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9b4d326

Please sign in to comment.