diff --git a/doc/api/README.md b/doc/api/README.md new file mode 100644 index 0000000..9986c9e --- /dev/null +++ b/doc/api/README.md @@ -0,0 +1,2 @@ +[中文(简体)](README.zh_CN.md) +* [Server Version](version.md) diff --git a/doc/api/README.zh_CN.md b/doc/api/README.zh_CN.md new file mode 100644 index 0000000..788310e --- /dev/null +++ b/doc/api/README.zh_CN.md @@ -0,0 +1,3 @@ +[English](README.md) +* [服务器版本](version.zh_CN.md) +* [服务器验证](auth.zh_CN.md) diff --git a/doc/api/auth.zh_CN.md b/doc/api/auth.zh_CN.md new file mode 100644 index 0000000..25ce74d --- /dev/null +++ b/doc/api/auth.zh_CN.md @@ -0,0 +1,5 @@ +# 验证相关API +## 获取服务器验证状态 +* 路径: `/api/auth/status`、 `/auth/status`、 `/api/auth` 或 `/auth` +* 方法: `GET` 或 `POST` +* 鉴权: 无需 diff --git a/doc/api/auth/status.zh_CN.json b/doc/api/auth/status.zh_CN.json new file mode 100644 index 0000000..cd45d20 --- /dev/null +++ b/doc/api/auth/status.zh_CN.json @@ -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": "是否存在根用户,如不存在,添加用户无需鉴权" + } + } +} diff --git a/doc/api/version.md b/doc/api/version.md index ec7ee93..45192ba 100644 --- a/doc/api/version.md +++ b/doc/api/version.md @@ -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 diff --git a/doc/api/version.zh_CN.json b/doc/api/version.zh_CN.json new file mode 100644 index 0000000..b3ddf2f --- /dev/null +++ b/doc/api/version.zh_CN.json @@ -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 + } + } +} diff --git a/doc/api/version.zh_CN.md b/doc/api/version.zh_CN.md index e5fad02..350708c 100644 --- a/doc/api/version.zh_CN.md +++ b/doc/api/version.zh_CN.md @@ -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)