Update doc

This commit is contained in:
2022-09-19 07:34:47 +00:00
committed by GitHub
parent 1bc1582ced
commit c356540463
5 changed files with 38 additions and 3 deletions

View File

@@ -3,3 +3,8 @@
* 路径: `/api/auth/status``/auth/status``/api/auth``/auth`
* 方法: `GET``POST`
* 鉴权: 无需
## 新增用户
* 路径: `/api/auth/user/add``/auth/user/add`
* 方法: `GET``POST`
* RESTful: `PUT /api/auth/user``PUT /auth/user`
* 鉴权: 一般需要(如服务器状态内的`has_root_user``false`则无需鉴权)

View File

@@ -8,5 +8,6 @@
"type": "boolean",
"description": "是否存在根用户,如不存在,添加用户无需鉴权"
}
}
},
"required": ["has_root_user"]
}

27
doc/api/result.zh_CN.json Normal file
View 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.zh_CN.json",
"title": "返回结果",
"type": "object",
"properties": {
"ok": {
"description": "请求是否成功",
"type": "boolean"
},
"code": {
"description": "错误代码,如请求成功则为0",
"type": "integer"
},
"msg": {
"description": "错误信息",
"type": "string"
},
"debug_msg": {
"description": "调试用的错误信息"
},
"result": {
"description": "请求结果"
}
},
"required": ["ok", "code"]
}

View File

@@ -13,5 +13,6 @@
"maxItems": 4,
"minItems": 4
}
}
},
"required": ["version"]
}

View File

@@ -13,5 +13,6 @@
"maxItems": 4,
"minItems": 4
}
}
},
"required": ["version"]
}