This commit is contained in:
2022-09-18 13:48:45 +00:00
committed by GitHub
parent 59562eaec8
commit da1343d950
7 changed files with 43 additions and 4 deletions

2
doc/api/README.md Normal file
View File

@@ -0,0 +1,2 @@
[中文(简体)](README.zh_CN.md)
* [Server Version](version.md)

3
doc/api/README.zh_CN.md Normal file
View File

@@ -0,0 +1,3 @@
[English](README.md)
* [服务器版本](version.zh_CN.md)
* [服务器验证](auth.zh_CN.md)

5
doc/api/auth.zh_CN.md Normal file
View File

@@ -0,0 +1,5 @@
# 验证相关API
## 获取服务器验证状态
* 路径: `/api/auth/status``/auth/status``/api/auth``/auth`
* 方法: `GET``POST`
* 鉴权: 无需

View File

@@ -0,0 +1,12 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/auth/status.zh_CN.json",
"title": "服务器验证状态",
"type": "object",
"properties": {
"has_root_user": {
"type": "boolean",
"description": "是否存在根用户,如不存在,添加用户无需鉴权"
}
}
}

View File

@@ -3,5 +3,5 @@
* route: `/version` or `/api/version`
* method: `GET` or `POST`
* auth: Not needed
* [Example](version.example.json)
* [JSON schema](version.json)
* [Example](version.example.json) of the response
* [JSON schema](version.json) of the response

View File

@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/version.zh_CN.json",
"title": "服务器版本",
"type": "object",
"properties": {
"version": {
"description": "API版本",
"type": "array",
"items": {
"type": "integer"
},
"maxItems": 4,
"minItems": 4
}
}
}

View File

@@ -3,5 +3,5 @@
* 路径: `/version``/api/version`
* 方法: `GET``POST`
* 鉴权: 无需
* [示例](version.example.json)
* [JSON Schema](version.json)
* 返回结构[示例](version.example.json)
* 返回结果的[JSON Schema](version.zh_CN.json)