Update document

This commit is contained in:
2022-10-19 04:40:05 +00:00
committed by GitHub
parent 0b125fa710
commit ef88c44361
8 changed files with 165 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
{
"$schema": "add.json",
"ok": true,
"code": 0,
"result": {
"id": 0,
"name": "John",
"username": "john",
"is_admin": true
}
}

View File

@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/auth/user/add.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": {
"$ref": "user.json",
"description": "The information about the new user or modified user"
}
},
"required": ["ok", "code"]
}

View File

@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/auth/user/add.zh_CN.json",
"title": "返回结果",
"type": "object",
"properties": {
"ok": {
"description": "请求是否成功",
"type": "boolean"
},
"code": {
"description": "错误代码,如请求成功则为0",
"type": "integer"
},
"msg": {
"description": "错误信息",
"type": "string"
},
"debug_msg": {
"description": "调试用的错误信息"
},
"result": {
"$ref": "user.zh_CN.json",
"description": "新用户/被修改用户的信息"
}
},
"required": ["ok", "code"]
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/auth/user/user.json",
"title": "User's information",
"properties": {
"id": {
"type": "number",
"minimum": 0,
"maximum": 18446744073709551615,
"description": "User ID"
},
"name": {
"type": "string",
"description": "User's name"
},
"username": {
"type": "string"
},
"is_admin": {
"type": "boolean",
"description": "Whether the user is an admin"
}
},
"required": ["id", "name", "username", "is_admin"]
}

View File

@@ -0,0 +1,26 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/lifegpc/pixiv_downloader/raw/master/doc/api/auth/user/user.zh_CN.json",
"title": "用户信息",
"properties": {
"id": {
"type": "number",
"minimum": 0,
"maximum": 18446744073709551615,
"description": "用户ID"
},
"name": {
"type": "string",
"description": "用户名字"
},
"username": {
"type": "string",
"description": "用户名"
},
"is_admin": {
"type": "boolean",
"description": "用户是否为管理员"
}
},
"required": ["id", "name", "username", "is_admin"]
}