Skip to content

Commit 668d87b

Browse files
committed
Update msg.md
1 parent 1316372 commit 668d87b

1 file changed

Lines changed: 53 additions & 2 deletions

File tree

src/api/v1/msg.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ POST /v1/msg/list-message
265265
|-----|-----|-----|
266266
|token|||
267267

268-
请求头:
268+
请求体:
269269
```ProtoBuf
270270
msg_count: 233 // 获取的消息数
271271
msg_id: "abcdef" // 从指定消息id开始,可不写
@@ -325,6 +325,7 @@ msg {
325325
}
326326
// ...
327327
```
328+
328329
::: details ProtoBuf数据结构
329330
```proto
330331
// 标签
@@ -422,7 +423,7 @@ POST /v1/msg/list-message-edit-record
422423
"list": [
423424
{
424425
"id": 1018684, // 信息编辑ID
425-
"msgId": "1bceae7bccfc447283304bbcbc9e9c1b", // 信息ID
426+
"msgId": "123123123123123123123123", // 信息ID
426427
"contentType": 1, // 信息类别
427428
"contentOld": "{\"text\":\"测试原始编辑文本\"}", // 信息文本,转意后json数据
428429
"createTime": 1231231231230, // 信息创建时间戳
@@ -435,3 +436,53 @@ POST /v1/msg/list-message-edit-record
435436
"msg": "success" // 返回消息
436437
}
437438
```
439+
440+
### 发送按钮点击事件
441+
442+
POST /v1/msg/button-report
443+
444+
请求头:
445+
|名称|必须|备注|
446+
|-----|-----|-----|
447+
|token|是|空
448+
449+
请求体:
450+
```ProtoBuf
451+
msg_id: "123123123123123123" // 信息ID
452+
chat_type: 2 // 对象类型, 1-用户 2-群聊 3-机器人
453+
chat_id: "123" // 对象ID
454+
user_id: "123" // 按钮事件发送者ID
455+
button_text: "测试按钮文本" // 欲点击按钮的文本标题
456+
```
457+
458+
::: details ProtoBuf数据结构
459+
```proto
460+
// 通过消息序列列出消息
461+
message button_report_send {
462+
string msg_id = 2; // 信息ID
463+
uint64 chat_type = 3; // 对象类型, 1-用户 2-群聊 3-机器人
464+
string chat_id = 4; // 对象ID
465+
string user_id = 5; // 按钮事件发送者ID
466+
string button_text = 6; // 欲点击按钮的文本标题
467+
}
468+
```
469+
:::
470+
471+
响应体:
472+
列出的是指定消息ID前的消息.
473+
```ProtoBuf
474+
status {
475+
number: 114514
476+
code: 1
477+
msg: "success"
478+
}
479+
```
480+
481+
::: details ProtoBuf数据结构
482+
```proto
483+
// 按钮事件点击返回状态信息
484+
message button_report {
485+
Status status = 1;
486+
}
487+
```
488+
:::

0 commit comments

Comments
 (0)