Skip to content

Commit

Permalink
z
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc committed Nov 26, 2024
1 parent f6b065f commit 5d113df
Showing 1 changed file with 158 additions and 1 deletion.
159 changes: 158 additions & 1 deletion openapi/v0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ paths:
`true` 只会返回 R18 条目。
`false` 只会返回非 R18 条目。
responses:
200:
description: 返回搜索结果
Expand All @@ -140,6 +139,120 @@ paths:
schema:
"$ref": "#/components/schemas/Paged_Subject"

"/v0/search/characters":
post:
tags:
- 角色
summary: 角色搜索
operationId: searchCharacters
description: |
## 实验性 API, 本 schema 和实际的 API 行为都可能随时发生改动
目前支持的筛选条件包括:
- `nsfw`: 使用 `include` 包含NSFW搜索结果。默认排除搜索NSFW条目。无权限情况下忽略此选项,不会返回NSFW条目。
parameters:
- name: limit
in: query
description: 分页参数
required: false
schema:
type: integer
- name: offset
in: query
description: 分页参数
required: false
schema:
type: integer
requestBody:
content:
"application/json":
schema:
type: object
required:
- keyword
properties:
keyword:
type: string
filter:
type: object
description: 不同条件之间是 `且` 的关系
properties:
nsfw:
type: boolean
description: |
无权限的用户会直接忽略此字段,不会返回 R18 角色。
默认或者 `null` 会返回包含 R18 的所有搜索结果。
`true` 只会返回 R18 角色。
`false` 只会返回非 R18 角色。
responses:
200:
description: 返回搜索结果
content:
application/json:
schema:
"$ref": "#/components/schemas/Paged_Character"

"/v0/search/persons":
post:
tags:
- 人物
summary: 人物搜索
operationId: searchPersons
description: |
## 实验性 API, 本 schema 和实际的 API 行为都可能随时发生改动
目前支持的筛选条件包括:
- `career`: 职业,可以多次出现。`且` 关系。
不同筛选条件之间为 `且`
parameters:
- name: limit
in: query
description: 分页参数
required: false
schema:
type: integer
- name: offset
in: query
description: 分页参数
required: false
schema:
type: integer
requestBody:
content:
"application/json":
schema:
type: object
required:
- keyword
properties:
keyword:
type: string
filter:
type: object
description: 不同条件之间是 `且` 的关系
properties:
career:
type: array
items:
type: string
example:
- artist
- director
description: 职业,可以多次出现。多值之间为 `且` 关系。
responses:
200:
description: 返回搜索结果
content:
application/json:
schema:
"$ref": "#/components/schemas/Paged_Person"

"/v0/subjects":
get:
tags:
Expand Down Expand Up @@ -2526,6 +2639,50 @@ components:
items:
"$ref": "#/components/schemas/Subject"
default: []
Paged_Character:
title: Paged[Character]
type: object
properties:
total:
title: Total
type: integer
default: 0
limit:
title: Limit
type: integer
default: 0
offset:
title: Offset
type: integer
default: 0
data:
title: Data
type: array
items:
"$ref": "#/components/schemas/Character"
default: []
Paged_Person:
title: Paged[Person]
type: object
properties:
total:
title: Total
type: integer
default: 0
limit:
title: Limit
type: integer
default: 0
offset:
title: Offset
type: integer
default: 0
data:
title: Data
type: array
items:
"$ref": "#/components/schemas/Person"
default: []
Paged_Episode:
title: Paged[Episode]
type: object
Expand Down

0 comments on commit 5d113df

Please sign in to comment.