Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #246 from MoRanYue/docs
Browse files Browse the repository at this point in the history
补全文档
  • Loading branch information
whitechi73 authored Feb 20, 2024
2 parents c28b57f + 34e14ef commit 195feb0
Show file tree
Hide file tree
Showing 5 changed files with 329 additions and 15 deletions.
4 changes: 3 additions & 1 deletion docs/api/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ data 的响应内容为 json 数组,每个元素内容如下:

### API 端点

`/group_touch`
`/group_touch` - 用于HTTP

`/poke` - 用于主动WebSocket与被动WebSocket

### 参数

Expand Down
150 changes: 150 additions & 0 deletions docs/api/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,153 @@ icon: feather-alt
| pic | string || 图片base64 |
| sender | int64 || QQ |
| troop | int64 || 图片发送到的群聊 |

## 获取 Cookie

### API 端点

`get_cookies`

### 参数

| 字段 | 类型 | 必须 | 说明 |
| ---- | ------ | ---- | ------ |
| domain | string || 域名 |

### 响应

::: tabs

@tab 响应字段

| 字段 | 类型 | 说明 |
| ------- | ----- | ------------ |
| cookies | string | 指定域名下的 Cookie |

@tab 响应示例

```json
{
"status": "ok",
"retcode": 0,
"data": {
"cookies": "uin=o1234567890; skey=***; p_uin=o1234567890; p_skey=; pt4_token="
},
"echo": ""
}
```

:::

## 获取 CSRF 令牌

### API 端点

`get_csrf_token`

### 参数

| 字段 | 类型 | 必须 | 说明 |
| ---- | ------ | ---- | ------ |
| domain | string || 域名 |

### 响应

::: tabs

@tab 响应字段

| 字段 | 类型 | 说明 |
| ------- | ----- | ------------ |
| token | string | 指定域名下的 CSRF 令牌 |

@tab 响应示例

```json
{
"status": "ok",
"retcode": 0,
"data": {
"token": "***"
},
"echo": ""
}
```

:::

## 获取Cookie

### API 端点

`get_cookies`

### 参数

| 字段 | 类型 | 必须 | 说明 |
| ---- | ------ | ---- | ------ |
| domain | string || 域名 |

### 响应

::: tabs

@tab 响应字段

| 字段 | 类型 | 说明 |
| ------- | ----- | ------------ |
| cookies | string | 指定域名下的 Cookie |

@tab 响应示例

```json
{
"status": "ok",
"retcode": 0,
"data": {
"cookies": "uin=o1234567890; skey=***; p_uin=o1234567890; p_skey=; pt4_token="
},
"echo": ""
}
```

:::

## 获取 Cookie 与 CSRF 令牌

### API 端点

`get_credentials`

### 参数

| 字段 | 类型 | 必须 | 说明 |
| ---- | ------ | ---- | ------ |
| domain | string || 域名 |

### 响应

::: tabs

@tab 响应字段

| 字段 | 类型 | 说明 |
| ------- | ----- | ------------ |
| cookies | string | 指定域名下的 Cookie |
| token | string | 指定域名下的 CSRF 令牌 |

@tab 响应示例

```json
{
"status": "ok",
"retcode": 0,
"data": {
"token": "***",
"cookies": "uin=o1234567890; skey=***; p_uin=o1234567890; p_skey=***; pt4_token=***"
},
"echo": ""
}
```

:::
143 changes: 143 additions & 0 deletions docs/api/shamrock.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,25 @@ url和base64至少一个不能为空
>
> 调用后会阻塞直到下载完成后才会返回数据,请注意下载大文件时的超时
## 清除缓存

### API 端点

`clean_cache`

### 参数

该接口没有参数

### 响应

```json
{
"status": "ok",
"retcode": 0
}
```

## 获取手机电池信息

### API 端点
Expand Down Expand Up @@ -175,3 +194,127 @@ url和base64至少一个不能为空
### 响应

无响应

## 获取所有支持的动作

### API 端点

`/get_supported_actions`

### 响应

{
"status": "ok",
"retcode": 0,
"data": [
"set_group_ban",
"clean_cache",
"clear_msgs",
"create_group_file_folder",
"delete_essence_message",
"delete_essence_msg",
"delete_group_file",
"delete_group_folder",
"delete_msg",
"delete_message",
"download_file",
"fav.add_image_msg",
"fav.add_text_msg",
"fav.get_item_content",
"fav.get_item_list",
"get_csrf_token",
"get_cookie",
"get_cookies",
"get_credentials",
"get_device_battery",
"get_essence_message_list",
"get_essence_msg_list",
"get_forward_msg",
"get_friend_list",
"get_friend_system_msg",
"get_group_file_system_info",
"get_group_file_url",
"get_group_msg_history",
"get_group_notice",
"_get_group_notice",
"get_group_at_all_remain",
"get_group_root_files",
"get_group_files_by_folder",
"get_group_system_msg",
"get_guild_list",
"get_guild_service_profile",
"get_history_msg",
"get_http_cookies",
"get_image",
"get_latest_events",
"get_login_info",
"get_model_show",
"_get_model_show",
"get_msg",
"get_message",
"get_not_joined_group_info",
"_get_online_clients",
"get_profile_card",
"get_user_info",
"get_prohibited_member_list",
"get_record",
"get_self_info",
"status",
"get_status",
"_get_stranger_info",
"get_stranger_info",
"get_supported_actions",
"get_troop_honor_info",
"get_group_honor_info",
"get_group_info",
"get_group_list",
"get_group_member_info",
"get_group_member_list",
"get_uid",
"get_uin_by_uid",
"get_version",
"get_version_info",
"get_weather",
"get_weather_city_code",
"poke",
"is_blacklist_uin",
"kick_group_member",
"set_group_kick",
"set_group_leave",
"leave_group",
"set_group_card",
"set_group_name",
".handle_quick_operation_async",
"rename_group_folder",
"restart_me",
"sanc_qrcode",
"send_forward_msg",
"send_group_forward_msg",
"send_group_msg",
"send_group_message",
"send_group_announcement",
"send_group_notice",
"send_group_sign",
"send_like",
"send_message",
"send_msg",
"send_private_forward_msg",
"send_private_message",
"send_private_msg",
"set_essence_message",
"set_essence_msg",
"set_friend_add_request",
"set_group_add_request",
"set_group_admin",
"set_group_comment_face",
"set_group_special_title",
"set_group_whole_ban",
"_set_model_show",
"set_qq_profile",
"switch_account",
"test",
"upload_group_file",
"upload_private_file"
],
"echo": ""
}
18 changes: 18 additions & 0 deletions docs/api/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,21 @@ icon: users
### 响应

该接口将返回处理结果,其中 `data` 字段无数据。


## 点赞资料卡

### API 端点

`send_like`

### 参数

| 字段 | 类型 | 必须 | 说明 |
| ---- | ------ | ---- | ------ |
| time | int32 || 点赞次数 |
| user_id | int64 || 点赞的目标用户 |

### 响应

该接口将返回处理结果,其中 `data` 字段无数据。
29 changes: 15 additions & 14 deletions docs/event/message.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,21 @@ icon: comment

## 消息事件

| 字段 | 类型 | 说明 |
| ------------ | ------ | -------------------------------------- |
| message_type | string | 消息类型 |
| sub_type | string | 消息子类型 |
| message_id | int64 | 消息 ID |
| user_id | int64 | 发送者 QQ 号 |
| message | object | 消息内容 |
| raw_message | string | CQ 码格式消息 |
| font | int32 | 字体 |
| sender | object | 发送人信息 |
| group_id | int64 | 群号 |
| target_id | int64 | 消息目标(私聊) |
| temp_source | int32 | 临时聊天来源(私聊) |
| peer_id | int64 | 消息接收者,群聊是群号,私聊时是目标QQ |
| 字段 | 类型 | 说明 |
| ------------ | ------ | ---------------------------------------- |
| message_type | string | 消息类型 |
| sub_type | string | 消息子类型 |
| message_id | int64 | 消息 ID |
| user_id | int64 | 发送者 QQ 号(在频道中,则为发送者的Tiny ID)|
| tiny_id | int64 | 发送者的Tiny ID(频道) |
| message | object | 消息内容 |
| raw_message | string | CQ 码格式消息 |
| font | int32 | 字体 |
| sender | object | 发送人信息 |
| group_id | int64 | 群号 |
| target_id | int64 | 消息目标(私聊) |
| temp_source | int32 | 临时聊天来源(私聊) |
| peer_id | int64 | 消息接收者,群聊是群号,私聊时是目标QQ |

## 私聊消息

Expand Down

0 comments on commit 195feb0

Please sign in to comment.