Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

6442 lines
169 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
components:
schemas:
Avatar:
properties:
large:
type: string
medium:
example: sai
type: string
small:
type: string
required:
- small
- medium
- large
title: Avatar
type: object
BaseEpisodeComment:
properties:
content:
type: string
createdAt:
type: integer
creatorID:
type: integer
epID:
type: integer
id:
type: integer
relatedID:
type: integer
state:
type: integer
user:
$ref: '#/components/schemas/SlimUser'
required:
- id
- epID
- creatorID
- relatedID
- createdAt
- content
- state
- user
type: object
BasicReply:
properties:
createdAt:
type: integer
creator:
$ref: '#/components/schemas/SlimUser'
id:
type: integer
state:
type: integer
text:
type: string
required:
- id
- creator
- createdAt
- text
- state
type: object
Character:
properties:
collects:
type: integer
comment:
type: integer
id:
type: integer
images:
$ref: '#/components/schemas/PersonImages'
infobox:
$ref: '#/components/schemas/Infobox'
lock:
type: boolean
name:
type: string
nameCN:
type: string
nsfw:
type: boolean
redirect:
type: integer
role:
type: integer
summary:
type: string
required:
- id
- name
- nameCN
- role
- infobox
- summary
- comment
- collects
- lock
- redirect
- nsfw
title: Character
type: object
CharacterRelation:
properties:
character:
$ref: '#/components/schemas/SlimCharacter'
relation:
description: '角色关系: 任职于,从属,聘用,嫁给...'
type: integer
required:
- character
- relation
type: object
CharacterSubject:
properties:
actors:
items:
$ref: '#/components/schemas/SlimPerson'
type: array
subject:
$ref: '#/components/schemas/SlimSubject'
type:
type: integer
required:
- subject
- actors
- type
type: object
CharacterSubjectRelation:
properties:
subject:
$ref: '#/components/schemas/SlimSubject'
type:
type: integer
required:
- subject
- type
type: object
CreateTopic:
example:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
content: topic content
title: topic title
properties:
cf-turnstile-response:
description: >-
需要
[turnstile](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/)
next.bgm.tv 域名对应的 site-key 为 `0x4AAAAAAABkMYinukE8nzYS`
dev.bgm38.com 域名使用测试用的 site-key `1x00000000000000000000AA`
type: string
text:
description: bbcode
minLength: 1
type: string
title:
minLength: 1
type: string
required:
- title
- text
- cf-turnstile-response
type: object
CurrentUser:
allOf:
- properties:
avatar:
$ref: '#/components/schemas/Avatar'
id:
examples:
- 1
type: integer
joinedAt:
type: integer
nickname:
examples:
- Sai🖖
type: string
sign:
type: string
username:
examples:
- sai
type: string
required:
- id
- username
- nickname
- avatar
- sign
- joinedAt
title: SlimUser
type: object
- properties:
permission:
properties:
subjectWikiEdit:
type: boolean
required:
- subjectWikiEdit
type: object
required:
- permission
type: object
type: object
Episode:
properties:
airdate:
type: string
comment:
type: integer
desc:
type: string
disc:
type: integer
duration:
type: string
id:
type: integer
lock:
type: boolean
name:
type: string
nameCN:
type: string
sort:
type: number
subjectID:
type: integer
type:
anyOf:
- enum:
- 0
type: number
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 5
type: number
- enum:
- 6
type: number
required:
- id
- subjectID
- sort
- type
- disc
- name
- nameCN
- duration
- airdate
- comment
- desc
- lock
title: Episode
type: object
EpisodeComments:
allOf:
- properties:
content:
type: string
createdAt:
type: integer
creatorID:
type: integer
epID:
type: integer
id:
type: integer
relatedID:
type: integer
state:
type: integer
user:
$ref: '#/components/schemas/SlimUser'
required:
- id
- epID
- creatorID
- relatedID
- createdAt
- content
- state
- user
type: object
- properties:
replies:
items:
$ref: '#/components/schemas/BaseEpisodeComment'
type: array
required:
- replies
type: object
type: object
EpisodeWikiInfo:
properties:
date:
description: YYYY-MM-DD
example: '2022-02-02'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
duration:
example: '24:53'
type: string
ep:
type: number
id:
type: integer
name:
type: string
nameCN:
type: string
subjectID:
type: integer
summary:
type: string
type:
anyOf:
- enum:
- 0
type: number
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 5
type: number
- enum:
- 6
type: number
required:
- id
- subjectID
- name
- nameCN
- type
- ep
- duration
- summary
type: object
ErrorResponse:
description: default error response type
properties:
code:
type: string
error:
type: string
message:
type: string
statusCode:
type: integer
required:
- code
- error
- message
- statusCode
type: object
Friend:
properties:
createdAt:
type: integer
description:
type: string
grade:
type: integer
user:
$ref: '#/components/schemas/SlimUser'
required:
- user
- grade
- createdAt
- description
title: Friend
type: object
Group:
properties:
createdAt:
type: integer
description:
type: string
icon:
type: string
id:
type: integer
name:
type: string
nsfw:
type: boolean
title:
type: string
totalMembers:
type: integer
required:
- id
- name
- nsfw
- title
- icon
- description
- totalMembers
- createdAt
title: Group
type: object
GroupMember:
properties:
avatar:
$ref: '#/components/schemas/Avatar'
id:
type: integer
joinedAt:
type: integer
nickname:
type: string
username:
type: string
required:
- id
- nickname
- username
- avatar
- joinedAt
title: GroupMember
type: object
GroupProfile:
properties:
group:
$ref: '#/components/schemas/Group'
inGroup:
description: 是否已经加入小组
type: boolean
recentAddedMembers:
items:
$ref: '#/components/schemas/GroupMember'
type: array
topics:
items:
$ref: '#/components/schemas/Topic'
type: array
totalTopics:
type: integer
required:
- recentAddedMembers
- topics
- inGroup
- group
- totalTopics
type: object
GroupReply:
properties:
createdAt:
type: integer
creator:
$ref: '#/components/schemas/SlimUser'
id:
type: integer
state:
type: integer
text:
type: string
topicID:
type: integer
topicTitle:
type: string
required:
- id
- creator
- createdAt
- text
- state
- topicID
- topicTitle
type: object
HistorySummary:
properties:
commitMessage:
type: string
createdAt:
description: unix timestamp seconds
type: integer
creator:
properties:
username:
type: string
required:
- username
type: object
type:
description: 修改类型。`1` 正常修改, `11` 合并,`103` 锁定/解锁 `104` 未知
type: integer
required:
- creator
- type
- commitMessage
- createdAt
type: object
Index:
properties:
collects:
type: integer
createdAt:
type: integer
creator:
$ref: '#/components/schemas/SlimUser'
desc:
type: string
id:
type: integer
replies:
type: integer
stats:
$ref: '#/components/schemas/IndexStats'
title:
type: string
total:
type: integer
type:
type: integer
updatedAt:
type: integer
required:
- id
- type
- title
- desc
- replies
- total
- collects
- stats
- createdAt
- updatedAt
- creator
title: Index
type: object
IndexStats:
additionalProperties:
type: integer
title: IndexStats
type: object
Infobox:
items:
properties:
key:
type: string
values:
items:
properties:
k:
type: string
v:
type: string
required:
- v
title: InfoboxValue
type: object
type: array
required:
- key
- values
title: InfoboxItem
type: object
title: Infobox
type: array
InfoboxItem:
properties:
key:
type: string
values:
items:
properties:
k:
type: string
v:
type: string
required:
- v
title: InfoboxValue
type: object
type: array
required:
- key
- values
title: InfoboxItem
type: object
InfoboxValue:
properties:
k:
type: string
v:
type: string
required:
- v
title: InfoboxValue
type: object
LoginRequestBody:
example:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
email: treeholechan@gmail.com
password: lovemeplease
properties:
cf-turnstile-response:
minLength: 1
type: string
email:
minLength: 1
type: string
password:
minLength: 1
type: string
required:
- email
- password
- cf-turnstile-response
type: object
Notice:
properties:
createdAt:
description: unix timestamp in seconds
type: integer
id:
type: integer
postID:
type: integer
sender:
properties:
avatar:
$ref: '#/components/schemas/Avatar'
id:
example: 1
type: integer
joinedAt:
type: integer
nickname:
example: Sai🖖
type: string
sign:
type: string
username:
example: sai
type: string
required:
- id
- username
- nickname
- avatar
- sign
- joinedAt
title: SlimUser
type: object
title:
type: string
topicID:
type: integer
type:
description: 查看 `./lib/notify.ts` _settings
type: integer
unread:
type: boolean
required:
- id
- title
- type
- sender
- topicID
- postID
- createdAt
- unread
type: object
Permission:
properties:
subjectWikiEdit:
type: boolean
required:
- subjectWikiEdit
type: object
Person:
properties:
career:
description: 职业
example: producer
items:
type: string
type: array
collects:
type: integer
comment:
type: integer
id:
type: integer
images:
$ref: '#/components/schemas/PersonImages'
infobox:
$ref: '#/components/schemas/Infobox'
lock:
type: boolean
name:
type: string
nameCN:
type: string
nsfw:
type: boolean
redirect:
type: integer
summary:
type: string
type:
type: integer
required:
- id
- name
- nameCN
- type
- infobox
- career
- summary
- comment
- collects
- lock
- redirect
- nsfw
title: Person
type: object
PersonCharacter:
properties:
character:
$ref: '#/components/schemas/SlimCharacter'
relations:
items:
$ref: '#/components/schemas/CharacterSubjectRelation'
type: array
required:
- character
- relations
type: object
PersonCollect:
properties:
createdAt:
type: integer
user:
$ref: '#/components/schemas/SlimUser'
required:
- user
- createdAt
type: object
PersonImages:
properties:
grid:
type: string
large:
type: string
medium:
type: string
small:
type: string
required:
- large
- medium
- small
- grid
title: PersonImages
type: object
PersonRelation:
properties:
person:
$ref: '#/components/schemas/SlimPerson'
relation:
description: '人物关系: 任职于,从属,聘用,嫁给...'
type: integer
required:
- person
- relation
type: object
PersonWikiInfo:
properties:
id:
type: integer
infobox:
type: string
name:
type: string
summary:
type: string
typeID:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
required:
- id
- name
- typeID
- infobox
- summary
type: object
PersonWork:
properties:
position:
$ref: '#/components/schemas/SubjectStaffPosition'
subject:
$ref: '#/components/schemas/SlimSubject'
required:
- subject
- position
type: object
Reaction:
properties:
selected:
type: boolean
total:
type: integer
value:
type: integer
required:
- selected
- total
- value
title: Reaction
type: object
RecentWikiChange:
properties:
persons:
items:
properties:
createdAt:
type: integer
id:
type: integer
required:
- id
- createdAt
type: object
type: array
subject:
items:
properties:
createdAt:
type: integer
id:
type: integer
required:
- id
- createdAt
type: object
type: array
required:
- subject
- persons
type: object
Reply:
properties:
createdAt:
type: integer
creator:
$ref: '#/components/schemas/SlimUser'
id:
type: integer
isFriend:
type: boolean
reactions:
items:
$ref: '#/components/schemas/Reaction'
type: array
replies:
items:
$ref: '#/components/schemas/SubReply'
type: array
state:
type: integer
text:
type: string
required:
- id
- isFriend
- replies
- creator
- createdAt
- text
- state
- reactions
title: Reply
type: object
SlimCharacter:
properties:
comment:
type: integer
id:
type: integer
images:
$ref: '#/components/schemas/PersonImages'
lock:
type: boolean
name:
type: string
nameCN:
type: string
nsfw:
type: boolean
role:
type: integer
required:
- id
- name
- nameCN
- role
- comment
- lock
- nsfw
title: SlimCharacter
type: object
SlimIndex:
properties:
createdAt:
type: integer
id:
type: integer
title:
type: string
total:
type: integer
type:
type: integer
required:
- id
- type
- title
- total
- createdAt
title: SlimIndex
type: object
SlimPerson:
properties:
comment:
type: integer
id:
type: integer
images:
$ref: '#/components/schemas/PersonImages'
lock:
type: boolean
name:
type: string
nameCN:
type: string
nsfw:
type: boolean
type:
type: integer
required:
- id
- name
- nameCN
- type
- comment
- lock
- nsfw
title: SlimPerson
type: object
SlimSubject:
example:
id: 8
images:
common: https://lain.bgm.tv/pic/cover/c/c9/f0/8_wK0z3.jpg
grid: https://lain.bgm.tv/pic/cover/g/c9/f0/8_wK0z3.jpg
large: https://lain.bgm.tv/pic/cover/l/c9/f0/8_wK0z3.jpg
medium: https://lain.bgm.tv/pic/cover/m/c9/f0/8_wK0z3.jpg
small: https://lain.bgm.tv/pic/cover/s/c9/f0/8_wK0z3.jpg
locked: false
name: コードギアス 反逆のルルーシュR2
nameCN: Code Geass 反叛的鲁路修R2
nsfw: false
type: 2
properties:
id:
type: integer
images:
$ref: '#/components/schemas/SubjectImages'
locked:
type: boolean
name:
type: string
nameCN:
type: string
nsfw:
type: boolean
type:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
required:
- id
- name
- nameCN
- type
- locked
- nsfw
title: SlimSubject
type: object
SlimUser:
properties:
avatar:
$ref: '#/components/schemas/Avatar'
id:
example: 1
type: integer
joinedAt:
type: integer
nickname:
example: Sai🖖
type: string
sign:
type: string
username:
example: sai
type: string
required:
- id
- username
- nickname
- avatar
- sign
- joinedAt
title: SlimUser
type: object
SubReply:
properties:
createdAt:
type: integer
creator:
$ref: '#/components/schemas/SlimUser'
id:
type: integer
isFriend:
type: boolean
reactions:
items:
$ref: '#/components/schemas/Reaction'
type: array
state:
type: integer
text:
type: string
required:
- id
- creator
- createdAt
- isFriend
- text
- state
- reactions
title: SubReply
type: object
Subject:
example:
airtime:
date: '2008-04-06'
month: 4
weekday: 7
year: 2008
collection:
'1': 622
'2': 13216
'3': 147
'4': 224
'5': 115
eps: 25
id: 8
images:
common: https://lain.bgm.tv/pic/cover/c/c9/f0/8_wK0z3.jpg
grid: https://lain.bgm.tv/pic/cover/g/c9/f0/8_wK0z3.jpg
large: https://lain.bgm.tv/pic/cover/l/c9/f0/8_wK0z3.jpg
medium: https://lain.bgm.tv/pic/cover/m/c9/f0/8_wK0z3.jpg
small: https://lain.bgm.tv/pic/cover/s/c9/f0/8_wK0z3.jpg
infobox:
Copyright:
- v: C2006 SUNRISE inc./MBS
中文名:
- v: Code Geass 反叛的鲁路修R2
人物原案:
- v: CLAMP
人物设定:
- v: 木村貴宏
其他:
- v: ''
其他电视台:
- v: ''
别名:
- v: 叛逆的鲁路修R2
- v: 'Code Geass: Hangyaku no Lelouch R2'
- v: 叛逆的勒鲁什R2
- v: 叛逆的鲁鲁修R2
- v: コードギアス 反逆のルルーシュR2
- v: 'Code Geass: Lelouch of the Rebellion R2'
- v: 叛逆的勒路什R2
动画制作:
- v: サンライズ
官方网站:
- v: http://www.geass.jp/r2/
导演:
- v: 谷口悟朗
摄影监督:
- v: 大矢創太
播放电视台:
- v: 每日放送
播放结束:
- v: 2008年9月28日
放送开始:
- v: 2008年4月6日
放送星期:
- v: ''
系列构成:
- v: 大河内一楼
美术监督:
- v: 菱沼由典
色彩设计:
- v: 岩沢れい子
话数:
- v: '25'
音乐:
- v: 中川幸太郎、黒石ひとみ
音乐制作:
- v: AUDIO PLANNING U
音响监督:
- v: 浦上靖夫、井澤基
locked: false
metaTags: [ ]
name: コードギアス 反逆のルルーシュR2
nameCN: Code Geass 反叛的鲁路修R2
nsfw: false
platform:
alias: tv
enableHeader: true
id: 1
order: 0
type: TV
typeCN: TV
wikiTpl: TVAnime
rating:
count:
- 44
- 15
- 32
- 66
- 145
- 457
- 1472
- 3190
- 2640
- 1377
score: 8.19
total: 9438
redirect: 0
series: false
seriesEntry: 0
summary: >-
  “东京决战”一年后,布里塔尼亚少年鲁路修在11区(原日本国)过着平凡的学生生活。但是,鲁路修与弟弟罗洛的一次出行,遇到了黑色骑士团的余党。在与少女C.C再次结成契约之后,尘封的记忆摆在了鲁路修的面前。
type: 2
volumes: 0
properties:
airtime:
$ref: '#/components/schemas/SubjectAirtime'
collection:
$ref: '#/components/schemas/SubjectCollection'
eps:
type: integer
id:
type: integer
images:
$ref: '#/components/schemas/SubjectImages'
infobox:
$ref: '#/components/schemas/Infobox'
locked:
type: boolean
metaTags:
items:
type: string
type: array
name:
type: string
nameCN:
type: string
nsfw:
type: boolean
platform:
$ref: '#/components/schemas/SubjectPlatform'
rating:
$ref: '#/components/schemas/SubjectRating'
redirect:
type: integer
series:
type: boolean
seriesEntry:
type: integer
summary:
type: string
tags:
items:
$ref: '#/components/schemas/SubjectTag'
type: array
type:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
volumes:
type: integer
required:
- airtime
- collection
- eps
- id
- infobox
- metaTags
- locked
- name
- nameCN
- nsfw
- platform
- rating
- redirect
- series
- seriesEntry
- summary
- type
- volumes
- tags
title: Subject
type: object
SubjectAirtime:
properties:
date:
type: string
month:
type: integer
weekday:
type: integer
year:
type: integer
required:
- date
- month
- weekday
- year
title: SubjectAirtime
type: object
SubjectCharacter:
properties:
actors:
items:
$ref: '#/components/schemas/SlimPerson'
type: array
character:
$ref: '#/components/schemas/SlimCharacter'
order:
type: integer
type:
type: integer
required:
- character
- actors
- type
- order
type: object
SubjectCollection:
additionalProperties:
type: integer
title: SubjectCollection
type: object
SubjectComment:
properties:
comment:
type: string
rate:
type: integer
updatedAt:
type: integer
user:
$ref: '#/components/schemas/SlimUser'
required:
- user
- rate
- comment
- updatedAt
title: SubjectComment
type: object
SubjectEdit:
example:
infobox: |-
{{Infobox animanga/TVAnime
|中文名= 沙盒
|别名={
}
|话数= 7
|放送开始= 0000-10-06
|放送星期=
|官方网站=
|播放电视台=
|其他电视台=
|播放结束=
|其他=
|Copyright=
|平台={
[龟壳]
[Xbox Series S]
[Xbox Series X]
[Xbox Series X/S]
[PC]
[Xbox Series X|S]
}
}}
name: 沙盒
nsfw: false
platform: 0
summary: |-
本条目是一个沙盒,可以用于尝试bgm功能。
普通维基人可以随意编辑条目信息以及相关关联查看编辑效果,但是请不要完全删除沙盒说明并且不要关联非沙盒条目/人物/角色。
https://bgm.tv/group/topic/366812#post_1923517
properties:
date:
example: '0000-00-00'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
infobox:
minLength: 1
type: string
metaTags:
items:
type: string
type: array
name:
minLength: 1
type: string
nsfw:
type: boolean
platform:
type: integer
summary:
type: string
required:
- name
- infobox
- platform
- nsfw
- metaTags
- summary
type: object
SubjectImages:
properties:
common:
type: string
grid:
type: string
large:
type: string
medium:
type: string
small:
type: string
required:
- large
- common
- medium
- small
- grid
title: SubjectImages
type: object
SubjectNew:
properties:
infobox:
minLength: 1
type: string
metaTags:
items:
type: string
type: array
name:
minLength: 1
type: string
nsfw:
type: boolean
platform:
type: integer
summary:
type: string
type:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
required:
- name
- type
- platform
- infobox
- nsfw
- metaTags
- summary
type: object
SubjectPlatform:
properties:
alias:
type: string
enableHeader:
type: boolean
id:
type: integer
order:
type: integer
searchString:
type: string
sortKeys:
items:
type: string
type: array
type:
type: string
typeCN:
type: string
wikiTpl:
type: string
required:
- id
- type
- typeCN
- alias
title: SubjectPlatform
type: object
SubjectRating:
properties:
count:
items:
type: integer
type: array
rank:
type: integer
score:
type: number
total:
type: integer
required:
- rank
- count
- score
- total
title: SubjectRating
type: object
SubjectRec:
properties:
count:
type: integer
sim:
type: number
subject:
$ref: '#/components/schemas/SlimSubject'
required:
- subject
- sim
- count
title: SubjectRec
type: object
SubjectRelation:
properties:
order:
type: integer
relation:
$ref: '#/components/schemas/SubjectRelationType'
subject:
$ref: '#/components/schemas/SlimSubject'
required:
- subject
- relation
- order
type: object
SubjectRelationType:
properties:
cn:
type: string
desc:
type: string
en:
type: string
id:
type: integer
jp:
type: string
required:
- id
- en
- cn
- jp
- desc
type: object
SubjectStaff:
properties:
person:
$ref: '#/components/schemas/SlimPerson'
position:
$ref: '#/components/schemas/SubjectStaffPosition'
required:
- person
- position
type: object
SubjectStaffPosition:
properties:
cn:
type: string
en:
type: string
id:
type: integer
jp:
type: string
required:
- id
- en
- cn
- jp
type: object
SubjectTag:
properties:
count:
type: integer
name:
type: string
required:
- name
- count
title: SubjectTag
type: object
SubjectWikiInfo:
properties:
availablePlatform:
items:
$ref: '#/components/schemas/WikiPlatform'
type: array
id:
type: integer
infobox:
type: string
metaTags:
items:
type: string
type: array
name:
type: string
nsfw:
type: boolean
platform:
type: integer
summary:
type: string
typeID:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
required:
- id
- name
- typeID
- infobox
- platform
- availablePlatform
- metaTags
- summary
- nsfw
type: object
Topic:
properties:
createdAt:
description: 发帖时间,unix time stamp in seconds
type: integer
creator:
$ref: '#/components/schemas/SlimUser'
display:
type: integer
id:
type: integer
parentID:
description: 小组/条目ID
type: integer
repliesCount:
type: integer
state:
type: integer
title:
type: string
updatedAt:
description: 最后回复时间,unix time stamp in seconds
type: integer
required:
- id
- creator
- title
- parentID
- createdAt
- updatedAt
- repliesCount
- state
- display
title: Topic
type: object
TopicDetail:
properties:
createdAt:
type: integer
creator:
$ref: '#/components/schemas/SlimUser'
id:
type: integer
parent:
anyOf:
- $ref: '#/components/schemas/Group'
- $ref: '#/components/schemas/SlimSubject'
reactions:
items:
$ref: '#/components/schemas/Reaction'
type: array
replies:
items:
$ref: '#/components/schemas/Reply'
type: array
state:
type: integer
text:
type: string
title:
type: string
required:
- id
- parent
- creator
- title
- text
- state
- createdAt
- replies
- reactions
title: TopicDetail
type: object
TrendingSubject:
properties:
count:
type: integer
subject:
$ref: '#/components/schemas/Subject'
required:
- subject
- count
type: object
UpdateTopic:
properties:
text:
description: bbcode
minLength: 1
type: string
title:
minLength: 1
type: string
required:
- title
- text
type: object
User:
properties:
avatar:
$ref: '#/components/schemas/Avatar'
bio:
type: string
group:
type: integer
id:
example: 1
type: integer
joinedAt:
type: integer
location:
type: string
nickname:
example: Sai🖖
type: string
sign:
type: string
site:
type: string
user_group:
description: deprecated, use group instead
type: integer
username:
example: sai
type: string
required:
- id
- username
- nickname
- avatar
- group
- user_group
- joinedAt
- sign
- site
- location
- bio
title: User
type: object
UserCharacterCollection:
properties:
character:
$ref: '#/components/schemas/Character'
createdAt:
type: integer
required:
- character
- createdAt
type: object
UserCollectionsCharacterSummary:
properties:
count:
type: integer
detail:
items:
$ref: '#/components/schemas/SlimCharacter'
type: array
required:
- count
- detail
type: object
UserCollectionsPersonSummary:
properties:
count:
type: integer
detail:
items:
$ref: '#/components/schemas/SlimPerson'
type: array
required:
- count
- detail
type: object
UserCollectionsSubjectSummary:
properties:
counts:
additionalProperties:
type: integer
example:
'1': 0
'2': 0
'3': 0
'4': 0
'5': 0
type: object
details:
additionalProperties:
items:
$ref: '#/components/schemas/SlimSubject'
type: array
example:
'1': [ ]
'2':
- id: 8
images:
common: https://lain.bgm.tv/pic/cover/c/c9/f0/8_wK0z3.jpg
grid: https://lain.bgm.tv/pic/cover/g/c9/f0/8_wK0z3.jpg
large: https://lain.bgm.tv/pic/cover/l/c9/f0/8_wK0z3.jpg
medium: https://lain.bgm.tv/pic/cover/m/c9/f0/8_wK0z3.jpg
small: https://lain.bgm.tv/pic/cover/s/c9/f0/8_wK0z3.jpg
locked: false
name: コードギアス 反逆のルルーシュR2
nameCN: Code Geass 反叛的鲁路修R2
nsfw: false
type: 2
'3': [ ]
'4': [ ]
'5': [ ]
type: object
required:
- counts
- details
type: object
UserCollectionsSummary:
properties:
character:
$ref: '#/components/schemas/UserCollectionsCharacterSummary'
index:
$ref: '#/components/schemas/UserIndexesSummary'
person:
$ref: '#/components/schemas/UserCollectionsPersonSummary'
subject:
additionalProperties:
$ref: '#/components/schemas/UserCollectionsSubjectSummary'
example:
'1':
counts:
'1': 0
'2': 1
'3': 0
'4': 0
'5': 0
details:
'1': [ ]
'2':
- id: 8
images:
common: https://lain.bgm.tv/pic/cover/c/c9/f0/8_wK0z3.jpg
grid: https://lain.bgm.tv/pic/cover/g/c9/f0/8_wK0z3.jpg
large: https://lain.bgm.tv/pic/cover/l/c9/f0/8_wK0z3.jpg
medium: https://lain.bgm.tv/pic/cover/m/c9/f0/8_wK0z3.jpg
small: https://lain.bgm.tv/pic/cover/s/c9/f0/8_wK0z3.jpg
locked: false
name: コードギアス 反逆のルルーシュR2
nameCN: Code Geass 反叛的鲁路修R2
nsfw: false
type: 2
'3': [ ]
'4': [ ]
'5': [ ]
type: object
required:
- subject
- character
- person
- index
type: object
UserHomepage:
properties:
left:
items:
type: string
type: array
right:
items:
type: string
type: array
required:
- left
- right
title: UserHomepage
type: object
UserIndexCollection:
properties:
createdAt:
type: integer
index:
$ref: '#/components/schemas/Index'
required:
- index
- createdAt
type: object
UserIndexesSummary:
properties:
count:
type: integer
detail:
items:
$ref: '#/components/schemas/SlimIndex'
type: array
required:
- count
- detail
type: object
UserPersonCollection:
properties:
createdAt:
type: integer
person:
$ref: '#/components/schemas/Person'
required:
- person
- createdAt
type: object
UserSubjectCollection:
properties:
comment:
type: string
epStatus:
type: integer
private:
type: boolean
rate:
type: integer
subject:
$ref: '#/components/schemas/Subject'
tags:
items:
type: string
type: array
type:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 5
type: number
updatedAt:
type: integer
volStatus:
type: integer
required:
- subject
- rate
- type
- comment
- tags
- epStatus
- volStatus
- private
- updatedAt
type: object
UserSubjectEpisodeCollection:
properties:
episode:
$ref: '#/components/schemas/Episode'
type:
anyOf:
- enum:
- 0
type: number
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
required:
- episode
- type
type: object
WikiPlatform:
properties:
id:
type: integer
text:
type: string
wiki_tpl:
type: string
required:
- id
- text
type: object
securitySchemes:
CookiesSession:
description: 使用 [login](#/auth/login) 调用 API 登录,或者 使用 [demo](/demo/login) 登录
in: cookie
name: chiiNextSessionID
type: apiKey
HTTPBearer:
description: 使用 [demo](/demo/login) 登录后创建个人令牌
scheme: Bearer
type: http
info:
description: >-
关于订阅通知的 socket.io 相关的文档在
<https://github.com/bangumi/GraphQL/blob/master/docs/socket.io.md>
title: bangumi private api
version: 2024-12-03-12cb3c7
openapi: 3.0.3
paths:
/p1/blocklist:
get:
operationId: getBlocklist
responses:
'200':
content:
application/json:
schema:
properties:
blocklist:
items:
type: integer
type: array
required:
- blocklist
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取绝交用户列表
tags:
- user
post:
operationId: addToBlocklist
requestBody:
content:
application/json:
schema:
properties:
id:
type: integer
required:
- id
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties:
blocklist:
items:
type: integer
type: array
required:
- blocklist
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 将用户添加到绝交列表
tags:
- user
/p1/blocklist/{id}:
delete:
operationId: removeFromBlocklist
parameters:
- in: path
name: id
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
blocklist:
items:
type: integer
type: array
required:
- blocklist
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 将用户从绝交列表移出
tags:
- user
/p1/characters/{characterID}:
get:
operationId: getCharacter
parameters:
- in: path
name: characterID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Character'
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: character not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取角色
tags:
- character
/p1/characters/{characterID}/casts:
get:
operationId: getCharacterCasts
parameters:
- description: 条目类型
in: query
name: subjectType
required: false
schema:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
- description: '角色出场类型: 主角,配角,客串'
in: query
name: type
required: false
schema:
type: integer
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: characterID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/CharacterSubject'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: character not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取角色出演作品
tags:
- character
/p1/characters/{characterID}/collects:
get:
operationId: getCharacterCollects
parameters:
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: characterID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/PersonCollect'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: character not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取角色的收藏用户
tags:
- character
/p1/clear-notify:
post:
description: |-
标记通知为已读
不传id时会清空所有未读通知
operationId: clearNotice
requestBody:
content:
application/json:
examples:
ClearAll:
value: { }
ClearSome:
value:
id:
- 1
- 2
schema:
properties:
id:
items:
type: integer
type: array
type: object
responses:
'200':
description: 没有返回值
'401':
content:
application/json:
examples:
NeedLoginError:
value:
code: NEED_LOGIN
error: Unauthorized
message: you need to login before marking notifications as read
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未登录
description: 未登录
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 标记通知为已读
tags:
- user
/p1/groups/-/posts/{postID}:
delete:
operationId: deleteGroupPost
parameters:
- example: 2092074
in: path
name: postID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'401':
content:
application/json:
examples:
NOT_ALLOWED:
value:
code: NOT_ALLOWED
error: Unauthorized
message: you don't have permission to delete this post
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: post not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- group
get:
operationId: getGroupPost
parameters:
- example: 2092074
in: path
name: postID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GroupReply'
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: post not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- group
put:
operationId: editGroupPost
parameters:
- example: 2092074
in: path
name: postID
required: true
schema:
type: integer
requestBody:
content:
application/json:
example:
text: new post contents
schema:
properties:
text:
minLength: 1
type: string
required:
- text
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'401':
content:
application/json:
examples:
NOT_ALLOWED:
value:
code: NOT_ALLOWED
error: Unauthorized
message: you don't have permission to edit reply
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- group
/p1/groups/-/topics/{id}:
get:
description: 获取帖子列表
operationId: getGroupTopicDetail
parameters:
- example: 371602
in: path
name: id
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TopicDetail'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- topic
/p1/groups/-/topics/{topicID}:
put:
operationId: editGroupTopic
parameters:
- example: 371602
in: path
name: topicID
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTopic'
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'401':
content:
application/json:
examples:
NOT_ALLOWED:
value:
code: NOT_ALLOWED
error: Unauthorized
message: you don't have permission to edit a topic
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- group
/p1/groups/-/topics/{topicID}/replies:
post:
operationId: createGroupReply
parameters:
- example: 371602
in: path
name: topicID
required: true
schema:
type: integer
requestBody:
content:
application/json:
examples:
example1:
value:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
content: post contents
example2:
value:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
content: post contents
replyTo: 2
schema:
properties:
cf-turnstile-response:
minLength: 1
type: string
content:
minLength: 1
type: string
replyTo:
default: 0
description: 被回复的 topic ID, `0` 代表回复楼主
example: 0
type: integer
required:
- content
- cf-turnstile-response
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BasicReply'
description: Default Response
'401':
content:
application/json:
examples:
NOT_JOIN_PRIVATE_GROUP_ERROR:
value:
code: NOT_JOIN_PRIVATE_GROUP_ERROR
error: Unauthorized
message: >-
you need to join private group '沙盒' before you create a
post or reply
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- group
/p1/groups/{groupName}/members:
get:
description: 获取帖子列表
operationId: listGroupMembersByName
parameters:
- in: query
name: type
required: false
schema:
anyOf:
- enum:
- mod
type: string
- enum:
- normal
type: string
- enum:
- all
type: string
default: all
- in: query
name: limit
required: false
schema:
default: 30
maximum: 40
type: integer
- in: query
name: offset
required: false
schema:
default: 0
type: integer
- in: path
name: groupName
required: true
schema:
minLength: 1
type: string
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/GroupMember'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- topic
/p1/groups/{groupName}/profile:
get:
description: 获取小组首页
operationId: getGroupProfile
parameters:
- in: query
name: limit
required: false
schema:
default: 20
maximum: 40
type: integer
- in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: groupName
required: true
schema:
minLength: 1
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GroupProfile'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- topic
/p1/groups/{groupName}/topics:
get:
description: 获取帖子列表
operationId: getGroupTopicsByGroupName
parameters:
- in: query
name: limit
required: false
schema:
default: 30
maximum: 40
type: integer
- in: query
name: offset
required: false
schema:
default: 0
type: integer
- in: path
name: groupName
required: true
schema:
minLength: 1
type: string
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/Topic'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'404':
content:
application/json:
examples:
NotFoundError:
value:
code: NOT_FOUND
error: Not Found
message: topic not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 小组不存在
description: 小组不存在
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- topic
post:
operationId: createNewGroupTopic
parameters:
- example: sandbox
in: path
name: groupName
required: true
schema:
minLength: 1
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTopic'
responses:
'200':
content:
application/json:
schema:
properties:
id:
description: new topic id
type: integer
required:
- id
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- group
/p1/login:
post:
description: >-
需要
[turnstile](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/)
next.bgm.tv 域名对应的 site-key 为 `0x4AAAAAAABkMYinukE8nzYS`
dev.bgm38.com 域名使用测试用的 site-key `1x00000000000000000000AA`
operationId: login
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LoginRequestBody'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SlimUser'
description: Default Response
headers:
Set-Cookie:
description: 'example: "chiiNextSessionID=12345abc"'
schema:
type: string
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: request validation error
description: request validation error
'401':
content:
application/json:
examples:
CAPTCHA_ERROR:
value:
code: CAPTCHA_ERROR
error: Unauthorized
message: wrong captcha
statusCode: 401
EMAIL_PASSWORD_ERROR:
value:
code: EMAIL_PASSWORD_ERROR
error: Unauthorized
message: email does not exists or email and password not match
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 验证码错误/账号密码不匹配
description: 验证码错误/账号密码不匹配
headers:
X-RateLimit-Limit:
description: total limit per 10 minutes
schema:
type: integer
X-RateLimit-Remaining:
description: remaining rate limit
schema:
type: integer
X-RateLimit-Reset:
description: seconds to reset rate limit
schema:
type: integer
'429':
content:
application/json:
example:
code: TOO_MANY_REQUESTS
error: Too Many Requests
message: too many failed login attempts
statusCode: 429
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 失败次数太多,需要过一段时间再重试
description: 失败次数太多,需要过一段时间再重试
headers:
X-RateLimit-Limit:
description: limit per 10 minutes
schema:
type: integer
X-RateLimit-Remaining:
description: remaining rate limit
schema:
type: integer
X-RateLimit-Reset:
description: seconds to reset rate limit
schema:
type: integer
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- user
/p1/logout:
post:
description: 登出
operationId: logout
requestBody:
content:
application/json:
schema:
properties: { }
type: object
responses:
'200':
content:
application/json:
schema: { }
description: Default Response
'401':
content:
application/json:
examples:
NeedLoginError:
value:
code: NEED_LOGIN
error: Unauthorized
message: you need to login before logout
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未登录
description: 未登录
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- user
/p1/me:
get:
operationId: getCurrentUser
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CurrentUser'
description: Default Response
'401':
content:
application/json:
example:
code: NEED_LOGIN
error: Unauthorized
message: you need to login before get current user
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- user
/p1/notify:
get:
operationId: listNotice
parameters:
- description: max 40
in: query
name: limit
required: false
schema:
default: 20
maximum: 40
type: integer
- in: query
name: unread
required: false
schema:
type: boolean
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/Notice'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'401':
content:
application/json:
examples:
NeedLoginError:
value:
code: NEED_LOGIN
error: Unauthorized
message: you need to login before getting notifications
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未登录
description: 未登录
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取未读通知
tags:
- user
/p1/persons/{personID}:
get:
operationId: getPerson
parameters:
- in: path
name: personID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Person'
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: person not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取人物
tags:
- person
/p1/persons/{personID}/casts:
get:
operationId: getPersonCasts
parameters:
- description: 条目类型
in: query
name: subjectType
required: false
schema:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
- description: '角色出场类型: 主角,配角,客串'
in: query
name: type
required: false
schema:
type: integer
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: personID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/PersonCharacter'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: person not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取人物的出演角色
tags:
- person
/p1/persons/{personID}/collects:
get:
operationId: getPersonCollects
parameters:
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: personID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/PersonCollect'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: person not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取人物的收藏用户
tags:
- person
/p1/persons/{personID}/works:
get:
operationId: getPersonWorks
parameters:
- description: 条目类型
in: query
name: subjectType
required: false
schema:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
- description: 职位
in: query
name: position
required: false
schema:
type: integer
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: personID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/PersonWork'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: person not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取人物的参与作品
tags:
- person
/p1/subjects/-/episode/-/comments/{commentID}:
delete:
operationId: deleteSubjectEpComment
parameters:
- example: 1034989
in: path
name: commentID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'401':
content:
application/json:
examples:
NOT_ALLOWED:
value:
code: NOT_ALLOWED
error: Unauthorized
message: you don't have permission to delete this comment
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: comment not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 删除条目的剧集吐槽
tags:
- subject
put:
operationId: editSubjectEpComment
parameters:
- example: 1075440
in: path
name: commentID
required: true
schema:
type: integer
requestBody:
content:
application/json:
example:
content: new comment contents
schema:
properties:
content:
minLength: 1
type: string
required:
- content
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 编辑条目的剧集吐槽
tags:
- subject
/p1/subjects/-/episode/{episodeID}/comments:
get:
operationId: getSubjectEpisodeComments
parameters:
- example: 1075440
in: path
name: episodeID
required: true
schema:
minimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
items:
allOf:
- properties:
content:
type: string
createdAt:
type: integer
creatorID:
type: integer
epID:
type: integer
id:
type: integer
relatedID:
type: integer
state:
type: integer
user:
$ref: '#/components/schemas/SlimUser'
required:
- id
- epID
- creatorID
- relatedID
- createdAt
- content
- state
- user
type: object
- properties:
replies:
items:
$ref: '#/components/schemas/BaseEpisodeComment'
type: array
required:
- replies
type: object
type: object
type: array
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
summary: 获取条目的剧集吐槽箱
tags:
- subject
post:
description: >-
需要
[turnstile](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/)
next.bgm.tv 域名对应的 site-key 为 `0x4AAAAAAABkMYinukE8nzYS`
dev.bgm38.com 域名使用测试用的 site-key `1x00000000000000000000AA`
operationId: createSubjectEpComment
parameters:
- example: 1075440
in: path
name: episodeID
required: true
schema:
type: integer
requestBody:
content:
application/json:
examples:
example1:
value:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
content: comment contents
example2:
value:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
content: comment contents
replyTo: 2
schema:
properties:
cf-turnstile-response:
minLength: 1
type: string
content:
minLength: 1
type: string
replyTo:
default: 0
description: 被回复的吐槽 ID, `0` 代表发送顶层吐槽
example: 0
type: integer
required:
- content
- cf-turnstile-response
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BasicReply'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 创建条目的剧集吐槽
tags:
- subject
/p1/subjects/-/posts/{postID}:
delete:
operationId: deleteSubjectPost
parameters:
- example: 2092074
in: path
name: postID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'401':
content:
application/json:
examples:
NOT_ALLOWED:
value:
code: NOT_ALLOWED
error: Unauthorized
message: you don't have permission to delete this post
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: post not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 删除自己创建的条目讨论版回复
tags:
- subject
get:
operationId: getSubjectPost
parameters:
- example: 2092074
in: path
name: postID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GroupReply'
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: post not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目讨论版回复
tags:
- subject
put:
operationId: editSubjectPost
parameters:
- example: 2092074
in: path
name: postID
required: true
schema:
type: integer
requestBody:
content:
application/json:
example:
text: new post contents
schema:
properties:
text:
minLength: 1
type: string
required:
- text
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'401':
content:
application/json:
examples:
NOT_ALLOWED:
value:
code: NOT_ALLOWED
error: Unauthorized
message: you don't have permission to edit reply
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 编辑自己创建的条目讨论版回复
tags:
- subject
/p1/subjects/-/topics/{topicID}:
get:
operationId: getSubjectTopic
parameters:
- example: 371602
in: path
name: topicID
required: true
schema:
minimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TopicDetail'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目讨论
tags:
- subject
put:
operationId: updateSubjectTopic
parameters:
- example: 371602
in: path
name: topicID
required: true
schema:
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
properties:
text:
description: bbcode
minLength: 1
type: string
title:
minLength: 1
type: string
required:
- title
- text
type: object
required: true
responses:
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 编辑自己创建的条目讨论
tags:
- subject
/p1/subjects/-/topics/{topicID}/replies:
post:
description: >-
需要
[turnstile](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/)
next.bgm.tv 域名对应的 site-key 为 `0x4AAAAAAABkMYinukE8nzYS`
dev.bgm38.com 域名使用测试用的 site-key `1x00000000000000000000AA`
operationId: createSubjectReply
parameters:
- example: 371602
in: path
name: topicID
required: true
schema:
type: integer
requestBody:
content:
application/json:
examples:
example1:
value:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
content: post contents
example2:
value:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
content: post contents
replyTo: 2
schema:
properties:
cf-turnstile-response:
minLength: 1
type: string
content:
minLength: 1
type: string
replyTo:
default: 0
description: 被回复的 topic ID, `0` 代表回复楼主
example: 0
type: integer
required:
- content
- cf-turnstile-response
type: object
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BasicReply'
description: Default Response
'401':
content:
application/json:
examples:
NOT_JOIN_PRIVATE_GROUP_ERROR:
value:
code: NOT_JOIN_PRIVATE_GROUP_ERROR
error: Unauthorized
message: >-
you need to join private group '沙盒' before you create a
post or reply
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 创建条目讨论版回复
tags:
- subject
/p1/subjects/{subjectID}:
get:
operationId: getSubject
parameters:
- in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Subject'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目
tags:
- subject
/p1/subjects/{subjectID}/characters:
get:
operationId: getSubjectCharacters
parameters:
- description: '角色出场类型: 主角,配角,客串'
in: query
name: type
required: false
schema:
type: integer
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/SubjectCharacter'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目的角色
tags:
- subject
/p1/subjects/{subjectID}/comments:
get:
operationId: getSubjectComments
parameters:
- description: 收藏类型
in: query
name: type
required: false
schema:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 5
type: number
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/SubjectComment'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目的吐槽箱
tags:
- subject
/p1/subjects/{subjectID}/episodes:
get:
operationId: getSubjectEpisodes
parameters:
- description: 剧集类型
in: query
name: type
required: false
schema:
anyOf:
- enum:
- 0
type: number
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 5
type: number
- enum:
- 6
type: number
- description: max 1000
in: query
name: limit
required: false
schema:
default: 100
maximum: 1000
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/Episode'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目的剧集
tags:
- subject
/p1/subjects/{subjectID}/recs:
get:
operationId: getSubjectRecs
parameters:
- description: max 10
in: query
name: limit
required: false
schema:
default: 10
maximum: 10
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/SubjectRec'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目的推荐
tags:
- subject
/p1/subjects/{subjectID}/relations:
get:
operationId: getSubjectRelations
parameters:
- description: 条目类型
in: query
name: type
required: false
schema:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
- description: 是否单行本
in: query
name: offprint
required: false
schema:
default: false
type: boolean
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/SubjectRelation'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目的关联条目
tags:
- subject
/p1/subjects/{subjectID}/staffs:
get:
operationId: getSubjectStaffs
parameters:
- description: '人物职位: 监督,原案,脚本,..'
in: query
name: position
required: false
schema:
type: integer
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/SubjectStaff'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目的制作人员
tags:
- subject
/p1/subjects/{subjectID}/topics:
get:
operationId: getSubjectTopics
parameters:
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/Topic'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取条目讨论版
tags:
- subject
post:
operationId: createSubjectTopic
parameters:
- example: 114514
in: path
name: subjectID
required: true
schema:
minimum: 0
type: integer
requestBody:
content:
application/json:
example:
cf-turnstile-response: 10000000-aaaa-bbbb-cccc-000000000001
content: topic content
title: topic title
schema:
properties:
cf-turnstile-response:
description: >-
需要
[turnstile](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/)
next.bgm.tv 域名对应的 site-key 为 `0x4AAAAAAABkMYinukE8nzYS`
dev.bgm38.com 域名使用测试用的 site-key `1x00000000000000000000AA`
type: string
text:
description: bbcode
minLength: 1
type: string
title:
minLength: 1
type: string
required:
- title
- text
- cf-turnstile-response
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties:
id:
description: new topic id
type: integer
required:
- id
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 创建条目讨论
tags:
- subject
/p1/trending/subjects:
get:
operationId: getTrendingSubjects
parameters:
- description: 条目类型
in: query
name: type
required: true
schema:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/TrendingSubject'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
summary: 获取热门条目
tags:
- trending
/p1/turnstile:
get:
description: 为防止滥用,Redirect URI 为白名单机制,如需添加请提交 PR。
operationId: getTurnstileToken
parameters:
- in: query
name: theme
required: false
schema:
anyOf:
- enum:
- dark
type: string
- enum:
- light
type: string
- enum:
- auto
type: string
- in: query
name: redirect_uri
required: true
schema:
type: string
responses:
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
summary: 获取 Turnstile 令牌
tags:
- user
/p1/users/-/collections/subjects/-/episodes/{episodeID}:
get:
operationId: getUserSubjectCollectionEpisodeByEpisodeID
parameters:
- in: path
name: episodeID
required: true
schema:
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserSubjectEpisodeCollection'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户单个条目的单个章节收藏
tags:
- user
/p1/users/-/collections/subjects/{subjectID}/episodes:
get:
operationId: getUserSubjectCollectionEpisodesBySubjectID
parameters:
- description: 剧集类型
in: query
name: type
required: false
schema:
anyOf:
- enum:
- 0
type: number
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 5
type: number
- enum:
- 6
type: number
- description: max 1000
in: query
name: limit
required: false
schema:
default: 100
maximum: 1000
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: subjectID
required: true
schema:
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/UserSubjectEpisodeCollection'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户单个条目的章节收藏
tags:
- user
/p1/users/{username}:
get:
operationId: getUser
parameters:
- in: path
name: username
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户信息
tags:
- user
/p1/users/{username}/collections/characters:
get:
operationId: getUserCharacterCollections
parameters:
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: username
required: true
schema:
minLength: 1
type: string
responses:
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户角色收藏
tags:
- user
/p1/users/{username}/collections/characters/{characterID}:
get:
operationId: getUserCharacterCollectionByCharacterID
parameters:
- in: path
name: username
required: true
schema:
minLength: 1
type: string
- in: path
name: characterID
required: true
schema:
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserCharacterCollection'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户单个角色收藏
tags:
- user
/p1/users/{username}/collections/indexes:
get:
operationId: getUserIndexCollections
parameters:
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: username
required: true
schema:
minLength: 1
type: string
responses:
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户目录收藏
tags:
- user
/p1/users/{username}/collections/indexes/{indexID}:
get:
operationId: getUserIndexCollectionByIndexID
parameters:
- in: path
name: username
required: true
schema:
minLength: 1
type: string
- in: path
name: indexID
required: true
schema:
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserIndexCollection'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户单个目录收藏
tags:
- user
/p1/users/{username}/collections/persons:
get:
operationId: getUserPersonCollections
parameters:
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: username
required: true
schema:
minLength: 1
type: string
responses:
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户人物收藏
tags:
- user
/p1/users/{username}/collections/persons/{personID}:
get:
operationId: getUserPersonCollectionByPersonID
parameters:
- in: path
name: username
required: true
schema:
minLength: 1
type: string
- in: path
name: personID
required: true
schema:
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserPersonCollection'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户单个人物收藏
tags:
- user
/p1/users/{username}/collections/subjects:
get:
operationId: getUserSubjectCollections
parameters:
- description: 条目类型
in: query
name: subjectType
required: false
schema:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
- description: 收藏类型
in: query
name: type
required: false
schema:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 5
type: number
- description: 起始时间戳
in: query
name: since
required: false
schema:
minimum: 0
type: integer
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: username
required: true
schema:
minLength: 1
type: string
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/UserSubjectCollection'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户条目收藏
tags:
- user
/p1/users/{username}/collections/subjects/{subjectID}:
get:
operationId: getUserSubjectCollectionBySubjectID
parameters:
- in: path
name: username
required: true
schema:
minLength: 1
type: string
- in: path
name: subjectID
required: true
schema:
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserSubjectCollection'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户单个条目收藏
tags:
- user
/p1/users/{username}/collections/summary:
get:
operationId: getUserCollectionsSummary
parameters:
- in: path
name: username
required: true
schema:
minLength: 1
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserCollectionsSummary'
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户收藏概览
tags:
- user
/p1/users/{username}/friends:
get:
operationId: getUserFriends
parameters:
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: username
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
properties:
data:
items:
$ref: '#/components/schemas/Friend'
type: array
total:
type: integer
required:
- data
- total
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户的好友列表
tags:
- user
/p1/users/{username}/indexes:
get:
operationId: getUserIndexes
parameters:
- description: max 100
in: query
name: limit
required: false
schema:
default: 20
maximum: 100
minimum: 1
type: integer
- description: min 0
in: query
name: offset
required: false
schema:
default: 0
minimum: 0
type: integer
- in: path
name: username
required: true
schema:
minLength: 1
type: string
responses:
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
summary: 获取用户创建的目录
tags:
- user
/p1/wiki/ep/{episodeID}:
get:
operationId: getEpisodeWikiInfo
parameters:
- example: 1148124
in: path
name: episodeID
required: true
schema:
minimum: 0
type: integer
responses:
'200':
content:
application/json:
example:
date: '2012-12-23'
duration: '00:23:37'
ep: 60
id: 1148124
name: キマリ×ト×ハジマリ
nameCN: 结末×与×开始
subjectID: 65536
summary: >-
ゴンとキルアはG.I.プレイヤー選考会にいよいよ挑戦する。審査を担当するツェズゲラから提示された合格の条件はただ一つ「練を見せる」こと。合格できる者は200人中32名という狭き門だが、ゴンとキルアはくぐり抜けることができるのか!?
type: 0
schema:
$ref: '#/components/schemas/EpisodeWikiInfo'
description: Default Response
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: episode not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- wiki
patch:
operationId: patchEpisodeWikiInfo
parameters:
- example: 1148124
in: path
name: episodeID
required: true
schema:
minimum: 0
type: integer
requestBody:
content:
application/json:
example:
commitMessage: why this episode is edited
episode:
date: '2022-01-20'
duration: '24:53'
ep: 4
name: name
nameCN: 中文名
summary: a short description
type: 0
schema:
properties:
commitMessage:
type: string
episode:
properties:
date:
description: YYYY-MM-DD
example: '2022-02-02'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
duration:
example: '24:53'
type: string
ep:
type: number
name:
type: string
nameCN:
type: string
subjectID:
type: integer
summary:
type: string
type:
anyOf:
- enum:
- 0
type: number
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 5
type: number
- enum:
- 6
type: number
type: object
required:
- commitMessage
- episode
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: invalid input
description: invalid input
'404':
content:
application/json:
examples:
NOT_FOUND:
value:
code: NOT_FOUND
error: Not Found
message: episode 1 not found
statusCode: 404
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- wiki
/p1/wiki/lock/subjects:
post:
operationId: lockSubject
requestBody:
content:
application/json:
schema:
properties:
reason:
type: string
subjectID:
example: 184017
type: integer
required:
- subjectID
- reason
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- wiki
/p1/wiki/persons/{personID}:
get:
description: 获取当前的 wiki 信息
operationId: getPersonWikiInfo
parameters:
- example: 1
in: path
name: personID
required: true
schema:
minimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PersonWikiInfo'
description: Default Response
'401':
content:
application/json:
examples:
INVALID_SYNTAX_ERROR:
value:
code: INVALID_SYNTAX_ERROR
error: Bad Request
message: '%s'
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 角色不存在
description: 角色不存在
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
tags:
- wiki
patch:
operationId: patchPersonInfo
parameters:
- example: 1
in: path
name: personID
required: true
schema:
minimum: 0
type: integer
requestBody:
content:
application/json:
schema:
additionalProperties: false
properties:
commitMessage:
minLength: 1
type: string
expectedRevision:
additionalProperties: false
default: { }
properties:
infobox:
minLength: 1
type: string
name:
minLength: 1
type: string
summary:
type: string
type: object
person:
additionalProperties: false
properties:
infobox:
minLength: 1
type: string
name:
minLength: 1
type: string
summary:
type: string
type: object
required:
- commitMessage
- expectedRevision
- person
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'400':
content:
application/json:
examples:
WIKI_CHANGED:
value:
code: WIKI_CHANGED
error: Bad Request
message: >-
expected data doesn't match, name changed, expecting "1",
currently "2"
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'401':
content:
application/json:
examples:
INVALID_SYNTAX_ERROR:
value:
code: INVALID_SYNTAX_ERROR
error: Bad Request
message: '%s'
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
tags:
- wiki
/p1/wiki/recent:
get:
description: 获取最近两天的wiki更新
operationId: getRecentWiki
parameters:
- description: |-
unix time stamp, only return last update time >= since
only allow recent 2 days
in: path
name: since
required: true
schema:
default: 0
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RecentWikiChange'
description: Default Response
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- wiki
/p1/wiki/subjects:
post:
description: 创建新条目
operationId: createNewSubject
requestBody:
content:
application/json:
schema:
properties:
infobox:
minLength: 1
type: string
metaTags:
items:
type: string
type: array
name:
minLength: 1
type: string
nsfw:
type: boolean
platform:
type: integer
summary:
type: string
type:
anyOf:
- enum:
- 1
type: number
- enum:
- 2
type: number
- enum:
- 3
type: number
- enum:
- 4
type: number
- enum:
- 6
type: number
required:
- name
- type
- platform
- infobox
- nsfw
- metaTags
- summary
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties:
subjectID:
type: number
required:
- subjectID
type: object
description: Default Response
'400':
content:
application/json:
examples:
INVALID_SYNTAX_ERROR:
value:
code: INVALID_SYNTAX_ERROR
error: Bad Request
message: '%s'
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
HTTPBearer: [ ]
tags:
- wiki
/p1/wiki/subjects/{subjectID}:
get:
description: 获取当前的 wiki 信息
operationId: subjectInfo
parameters:
- example: 363612
in: path
name: subjectID
required: true
schema:
minimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SubjectWikiInfo'
description: Default Response
'401':
content:
application/json:
examples:
INVALID_SYNTAX_ERROR:
value:
code: INVALID_SYNTAX_ERROR
error: Bad Request
message: '%s'
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- wiki
patch:
operationId: patchSubjectInfo
parameters:
- example: 363612
in: path
name: subjectID
required: true
schema:
minimum: 0
type: integer
requestBody:
content:
application/json:
example:
commitMessage: 修正笔误
subject:
infobox: |-
{{Infobox animanga/TVAnime
|中文名= 沙盒
|别名={
}
|话数= 7
|放送开始= 0000-10-06
|放送星期=
|官方网站=
|播放电视台=
|其他电视台=
|播放结束=
|其他=
|Copyright=
|平台={
[龟壳]
[Xbox Series S]
[Xbox Series X]
[Xbox Series X/S]
[PC]
[Xbox Series X|S]
}
}}
schema:
properties:
commitMessage:
minLength: 1
type: string
expectedRevision:
description: >-
a optional object to check if input is changed by others
if `infobox` is given, and current data in database doesn't
match input, subject will not be changed
properties:
infobox:
minLength: 1
type: string
metaTags:
items:
type: string
type: array
name:
minLength: 1
type: string
platform:
type: integer
type: object
subject:
example:
infobox: |-
{{Infobox animanga/TVAnime
|中文名= 沙盒
|别名={
}
|话数= 7
|放送开始= 0000-10-06
|放送星期=
|官方网站=
|播放电视台=
|其他电视台=
|播放结束=
|其他=
|Copyright=
|平台={
[龟壳]
[Xbox Series S]
[Xbox Series X]
[Xbox Series X/S]
[PC]
[Xbox Series X|S]
}
}}
name: 沙盒
nsfw: false
platform: 0
summary: >-
本条目是一个沙盒,可以用于尝试bgm功能。
普通维基人可以随意编辑条目信息以及相关关联查看编辑效果,但是请不要完全删除沙盒说明并且不要关联非沙盒条目/人物/角色。
https://bgm.tv/group/topic/366812#post_1923517
properties:
date:
example: '0000-00-00'
pattern: ^\d{4}-\d{2}-\d{2}$
type: string
infobox:
minLength: 1
type: string
metaTags:
items:
type: string
type: array
name:
minLength: 1
type: string
nsfw:
type: boolean
platform:
type: integer
summary:
type: string
type: object
required:
- commitMessage
- subject
type: object
required: true
responses:
'200':
description: Default Response
'401':
content:
application/json:
examples:
INVALID_SYNTAX_ERROR:
value:
code: INVALID_SYNTAX_ERROR
error: Bad Request
message: '%s'
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- wiki
put:
description: 需要 `subjectWikiEdit` 权限
operationId: putSubjectInfo
parameters:
- example: 363612
in: path
name: subjectID
required: true
schema:
minimum: 0
type: integer
requestBody:
content:
application/json:
example:
commitMessage: 修正笔误
subject:
infobox: |-
{{Infobox animanga/TVAnime
|中文名= 沙盒
|别名={
}
|话数= 7
|放送开始= 0000-10-06
|放送星期=
|官方网站=
|播放电视台=
|其他电视台=
|播放结束=
|其他=
|Copyright=
|平台={
[龟壳]
[Xbox Series S]
[Xbox Series X]
[Xbox Series X/S]
[PC]
[Xbox Series X|S]
}
}}
name: 沙盒
nsfw: false
platform: 0
summary: |-
本条目是一个沙盒,可以用于尝试bgm功能。
普通维基人可以随意编辑条目信息以及相关关联查看编辑效果,但是请不要完全删除沙盒说明并且不要关联非沙盒条目/人物/角色。
https://bgm.tv/group/topic/366812#post_1923517
schema:
properties:
commitMessage:
minLength: 1
type: string
expectedRevision:
description: >-
a optional object to check if input is changed by others
if `infobox` is given, and current data in database doesn't
match input, subject will not be changed
properties:
infobox:
minLength: 1
type: string
metaTags:
items:
type: string
type: array
name:
minLength: 1
type: string
platform:
type: integer
type: object
subject:
$ref: '#/components/schemas/SubjectEdit'
required:
- commitMessage
- subject
type: object
required: true
responses:
'200':
description: Default Response
'401':
content:
application/json:
examples:
INVALID_SYNTAX_ERROR:
value:
code: INVALID_SYNTAX_ERROR
error: Bad Request
message: '%s'
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- wiki
/p1/wiki/subjects/{subjectID}/covers:
get:
operationId: listSubjectCovers
parameters:
- example: 184017
in: path
name: subjectID
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
properties:
covers:
items:
properties:
creator:
properties:
avatar:
$ref: '#/components/schemas/Avatar'
id:
example: 1
type: integer
joinedAt:
type: integer
nickname:
example: Sai🖖
type: string
sign:
type: string
username:
example: sai
type: string
required:
- id
- username
- nickname
- avatar
- sign
- joinedAt
title: SlimUser
type: object
id:
type: integer
raw:
type: string
thumbnail:
type: string
voted:
type: boolean
required:
- id
- thumbnail
- raw
- creator
- voted
type: object
type: array
current:
properties:
id:
type: integer
raw:
type: string
thumbnail:
type: string
required:
- thumbnail
- raw
- id
type: object
required:
- covers
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- wiki
post:
description: 需要 `subjectWikiEdit` 权限
operationId: uploadSubjectCover
parameters:
- in: path
name: subjectID
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
properties:
content:
description: base64 encoded raw bytes, 4mb size limit on **decoded** size
format: byte
type: string
required:
- content
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'400':
content:
application/json:
examples:
IMAGE_FILE_TOO_LARGE:
value:
code: IMAGE_FILE_TOO_LARGE
error: Bad Request
message: uploaded image file is too large
statusCode: 400
IMAGE_FORMAT_NOT_SUPPORT:
value:
code: IMAGE_FORMAT_NOT_SUPPORT
error: Bad Request
message: not valid image file, only support jpeg, jpg, png, webp
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'401':
content:
application/json:
examples:
NOT_ALLOWED:
value:
code: NOT_ALLOWED
error: Unauthorized
message: you don't have permission to non sandbox subject
statusCode: 401
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- wiki
/p1/wiki/subjects/{subjectID}/covers/{imageID}/vote:
delete:
description: 需要 `subjectWikiEdit` 权限
operationId: unvoteSubjectCover
parameters:
- in: path
name: subjectID
required: true
schema:
exclusiveMinimum: 0
type: integer
- in: path
name: imageID
required: true
schema:
exclusiveMinimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
summary: 撤消条目封面投票
tags:
- wiki
post:
description: 需要 `subjectWikiEdit` 权限
operationId: voteSubjectCover
parameters:
- in: path
name: subjectID
required: true
schema:
exclusiveMinimum: 0
type: integer
- in: path
name: imageID
required: true
schema:
exclusiveMinimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
summary: 为条目封面投票
tags:
- wiki
/p1/wiki/subjects/{subjectID}/history-summary:
get:
description: 获取当前的 wiki 信息
operationId: subjectEditHistorySummary
parameters:
- example: 8
in: path
name: subjectID
required: true
schema:
minimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
items:
$ref: '#/components/schemas/HistorySummary'
type: array
description: Default Response
'401':
content:
application/json:
examples:
INVALID_SYNTAX_ERROR:
value:
code: INVALID_SYNTAX_ERROR
error: Bad Request
message: '%s'
statusCode: 400
schema:
$ref: '#/components/schemas/ErrorResponse'
description: default error response type
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
security:
- CookiesSession: [ ]
tags:
- wiki
/p1/wiki/unlock/subjects:
post:
operationId: unlockSubject
requestBody:
content:
application/json:
schema:
properties:
reason:
type: string
subjectID:
example: 184017
type: integer
required:
- subjectID
- reason
type: object
required: true
responses:
'200':
content:
application/json:
schema:
properties: { }
type: object
description: Default Response
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 意料之外的服务器错误
description: 意料之外的服务器错误
tags:
- wiki