mirror of
https://github.com/lifegpc/pixiv_downloader.git
synced 2026-06-22 03:44:24 +08:00
Update document
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
[中文(简体)](README.zh_CN.md)
|
||||
* [Server Version](version.md)
|
||||
* [Server Authentication](auth.md)
|
||||
|
||||
9
doc/api/auth.md
Normal file
9
doc/api/auth.md
Normal file
@@ -0,0 +1,9 @@
|
||||
[中文简体](auth.zh_CN.md)
|
||||
# Authentication related APIs
|
||||
## Get server authentication status
|
||||
* route: `/auth/status` or `/api/auth/status`
|
||||
* method: `GET` or `POST`
|
||||
* auth: Not needed
|
||||
* parameters: None
|
||||
* [Example](auth/status.example.json) of the response
|
||||
* [JSON schema](auth/status.json) of the response
|
||||
@@ -1,8 +1,12 @@
|
||||
[English](auth.md)
|
||||
# 验证相关API
|
||||
## 获取服务器验证状态
|
||||
* 路径: `/api/auth/status`、 `/auth/status`、 `/api/auth` 或 `/auth`
|
||||
* 方法: `GET` 或 `POST`
|
||||
* 鉴权: 无需
|
||||
* 参数:无
|
||||
* 返回结构[示例](auth/status.example.json)
|
||||
* 返回结果的[JSON Schema](auth/status.zh_CN.json)
|
||||
## 获取服务器公钥
|
||||
* 路径: `/api/auth/pubkey`、 `/auth/pubkey`
|
||||
* 方法: `GET` 或 `POST`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "pubkey.zh_CN.json",
|
||||
"$schema": "pubkey.json",
|
||||
"ok": true,
|
||||
"code": 0,
|
||||
"result": {
|
||||
|
||||
39
doc/api/auth/pubkey.json
Normal file
39
doc/api/auth/pubkey.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/auth/pubkey.json",
|
||||
"title": "Result object",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {
|
||||
"description": "Whether the request was successful",
|
||||
"type": "boolean"
|
||||
},
|
||||
"code": {
|
||||
"description": "Error code, 0 if it was successful",
|
||||
"type": "integer"
|
||||
},
|
||||
"msg": {
|
||||
"description": "Error message",
|
||||
"type": "string"
|
||||
},
|
||||
"debug_msg": {
|
||||
"description": "Error message contains debug information"
|
||||
},
|
||||
"result": {
|
||||
"description": "Result",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"key": {
|
||||
"description": "RSA public key",
|
||||
"type": "string"
|
||||
},
|
||||
"generated_time": {
|
||||
"description": "The generated time of the key",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": ["key", "generated_time"]
|
||||
}
|
||||
},
|
||||
"required": ["ok", "code"]
|
||||
}
|
||||
4
doc/api/auth/status.example.json
Normal file
4
doc/api/auth/status.example.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "status.json",
|
||||
"has_root_user": false
|
||||
}
|
||||
13
doc/api/auth/status.json
Normal file
13
doc/api/auth/status.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/auth/status.json",
|
||||
"title": "服务器验证状态",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"has_root_user": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to have the root user, if not, the authentication is not needed when adding new user."
|
||||
}
|
||||
},
|
||||
"required": ["has_root_user"]
|
||||
}
|
||||
27
doc/api/result.json
Normal file
27
doc/api/result.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/result.json",
|
||||
"title": "Result object",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {
|
||||
"description": "Whether the request was successful",
|
||||
"type": "boolean"
|
||||
},
|
||||
"code": {
|
||||
"description": "Error code, 0 if it was successful",
|
||||
"type": "integer"
|
||||
},
|
||||
"msg": {
|
||||
"description": "Error message",
|
||||
"type": "string"
|
||||
},
|
||||
"debug_msg": {
|
||||
"description": "Error message contains debug information"
|
||||
},
|
||||
"result": {
|
||||
"description": "Result"
|
||||
}
|
||||
},
|
||||
"required": ["ok", "code"]
|
||||
}
|
||||
Reference in New Issue
Block a user