Skip to content

Commit

Permalink
docs: add e621 / e926 related documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikoTan committed Mar 13, 2024
1 parent 4ebd5b2 commit d00cd85
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions docs/zh-CN/plugins/e621.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,20 @@
- 默认值:`https://e621.net`

e621/e926 的 API 地址。

#### keyPairs

- 类型:`Array<{ login: string; apiKey: string }>`
- 默认值:`[]`

e621/e926 的登录凭据。如该项为空,则使用匿名登录。

由于 e621/e926 的 [API 限制](https://e621.net/help/api),每个凭据一秒内只能搜索两次图片,因此推荐设置至少一个登录凭据用于检索图片,当登录凭据设置为多个时,将会针对每个凭据的搜索次数进行平均分配。

## 获取与设置登录凭据

1. 访问 [e621](https://e621.net/)[e926](https://e926.net/) 并登录。如果你还没有账号,你需要先注册一个账号。
1. 访问 [e621 的个人页面](https://e621.net/users/home)[e926 的个人页面](https//e926.net/users/home),点击 `Manage API Access` 按钮。
1. 如果它要求你输入密码,请输入密码并确认。
1. 在新的页面中,找到 `API Key` 字样,复制其下方的字符串的内容并粘贴到 Koishi 端的 `kayPairs` 配置项中的 `apiKey` 字段中。
1.`login` 字段中填写你的用户名,并保存配置。
2 changes: 1 addition & 1 deletion packages/e621/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace e621ImageSource {
}),
)
.default([])
.description('e621/e926 的 API Key。'),
.description('e621/e926 的登录凭据。'),
userAgent: Schema.string()
.description('设置请求的 User Agent。')
.default(
Expand Down

0 comments on commit d00cd85

Please sign in to comment.