Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 4 additions & 51 deletions src/api/v1/instruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,61 +177,14 @@ POST /v1/instruction/list
| ----- | ---- | ---- |
| token | 是 | 无 |

请求体
请求体

```protobuf
id: "123123123"
<!-- @include: @src/full.proto#GetBotInstructionRequest -->
```

::: details ProtoBuf 数据结构

```proto
message get_bot_instruction {
string id = 3;
}
```

:::

响应体:
响应体

```protobuf
status {
request_id: 123456
code: 1
msg: "success"
}
data {
command_id: 123 // 指令 id
bot_id: 123123123 // 机器人 id
command_name: "测试指令名称" // 指令名称
instruction_type: 5 // 指令类型: 1-普通指令,2-直发指令,5-自定义输入指令
command_defaultText: "测试默认输入文本" // 指令输入框默认文本
command_settingsJso: "{}" // 指令设置 JSON(表单指令,自定义输入指令)
}
<!-- @include: @src/full.proto#GetBotInstructionResponse -->
```

::: details ProtoBuf 数据结构

```proto
message Status {
uint64 request_id = 1;
uint64 code = 2;
string msg = 3;
}

message instruction_list {
Status status = 1;
Data data = 2;
message Data {
uint64 command_id = 1; // 指令 id
string bot_id = 2; // 机器人 id
string command_name = 3; // 指令名称
uint64 instruction_type = 5; // 指令类型: 1-普通指令,2-直发指令,5-自定义输入指令
string command_defaultText = 7; // 指令输入框默认文本
string command_settingsJson = 10; // 指令设置 JSON(表单指令,自定义输入指令)
}
}
```

:::
7 changes: 7 additions & 0 deletions src/api/v1/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ GET /v1/misc/configure-distribution
如果你的能力足够推荐使用分片上传 V2 版,支持断点续传,占用更小.
~~或者是直接用七牛 kodo 的 SDK.~~

通过 access_key 和 bucket 获取上传 Host方法:
注意: 这不是七牛官方文档中的内容,但是确实是七牛官方 SDK 在用的 API.

GET `https://api.qiniu.com/v4/query?ak=<access_key>&bucket=<bucket>`

响应中 `up` 下的域名就是上传 Host.

:::

## 获取图片上传token
Expand Down
Loading