bgm-types
Version:
Bangumi Api Types
2,072 lines (2,069 loc) • 81.8 kB
text/typescript
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/calendar": {
get: operations["getCalendar"];
};
"/search/subject/{keywords}": {
get: operations["searchSubjectByKeywords"];
};
"/v0/search/subjects": {
/**
* ## 实验性 API, 本 schema 和实际的 API 行为都可能随时发生改动
*
* 目前支持的筛选条件包括:
* - `type`: 条目类型,参照 `SubjectType` enum, `或`。
* - `tag`: 标签,可以多次出现。`且` 关系。
* - `airdate`: 播出日期/发售日期。`且` 关系。
* - `rating`: 用于搜索指定评分的条目。`且` 关系。
* - `rank`: 用于搜索指定排名的条目。`且` 关系。
* - `nsfw`: 使用 `include` 包含NSFW搜索结果。默认排除搜索NSFW条目。无权限情况下忽略此选项,不会返回NSFW条目。
*
* 不同筛选条件之间为 `且`
*
*
* 由于目前 meilisearch 的一些问题,条目排名更新并不会触发搜索数据更新,所以条目排名可能是过期数据。
*
* 希望未来版本的 meilisearch 能解决相关的问题。
*/
post: operations["searchSubjects"];
};
"/v0/subjects/{subject_id}": {
/** cache with 300s */
get: operations["getSubjectById"];
};
"/v0/subjects/{subject_id}/image": {
get: operations["getSubjectImageById"];
};
"/v0/subjects/{subject_id}/persons": {
get: operations["getRelatedPersonsBySubjectId"];
};
"/v0/subjects/{subject_id}/characters": {
get: operations["getRelatedCharactersBySubjectId"];
};
"/v0/subjects/{subject_id}/subjects": {
get: operations["getRelatedSubjectsBySubjectId"];
};
"/v0/episodes": {
get: operations["getEpisodes"];
};
"/v0/episodes/{episode_id}": {
get: operations["getEpisodeById"];
};
"/v0/characters/{character_id}": {
/** cache with 60s */
get: operations["getCharacterById"];
};
"/v0/characters/{character_id}/image": {
get: operations["getCharacterImageById"];
};
"/v0/characters/{character_id}/subjects": {
get: operations["getRelatedSubjectsByCharacterId"];
};
"/v0/characters/{character_id}/persons": {
get: operations["getRelatedPersonsByCharacterId"];
};
"/v0/persons/{person_id}": {
/** cache with 60s */
get: operations["getPersonById"];
};
"/v0/persons/{person_id}/image": {
get: operations["getPersonImageById"];
};
"/v0/persons/{person_id}/subjects": {
get: operations["getRelatedSubjectsByPersonId"];
};
"/v0/persons/{person_id}/characters": {
get: operations["getRelatedCharactersByPersonId"];
};
"/v0/users/{username}": {
/** 获取用户信息 */
get: operations["getUserByName"];
};
"/v0/users/{username}/avatar": {
/** 获取用户头像,302 重定向至头像地址,设置了 username 之后无法使用 UID 查询。 */
get: operations["getUserAvatarByName"];
};
"/v0/me": {
/** 返回当前 Access Token 对应的用户信息 */
get: operations["getMyself"];
};
"/v0/users/{username}/collections": {
/** 获取对应用户的收藏,查看私有收藏需要access token。 */
get: operations["getUserCollectionsByUsername"];
};
"/v0/users/{username}/collections/{subject_id}": {
/** 获取对应用户的收藏,查看私有收藏需要access token。 */
get: operations["getUserCollection"];
};
"/v0/users/-/collections/{subject_id}": {
/**
* 修改条目收藏状态
*
* 由于直接修改剧集条目的完成度可能会引起意料之外效果,只能用于修改书籍类条目的完成度。
*
* PATCH 方法的所有请求体字段均可选
*/
patch: operations["patchUserCollection"];
};
"/v0/users/-/collections/{subject_id}/episodes": {
get: operations["getUserSubjectEpisodeCollection"];
/** 同时会重新计算条目的完成度 */
patch: operations["patchUserSubjectEpisodeCollection"];
};
"/v0/users/-/collections/-/episodes/{episode_id}": {
get: operations["getUserEpisodeCollection"];
put: operations["putUserEpisodeCollection"];
};
"/v0/revisions/persons": {
get: operations["getPersonRevisions"];
};
"/v0/revisions/persons/{revision_id}": {
get: operations["getPersonRevisionByRevisionId"];
};
"/v0/revisions/characters": {
get: operations["getCharacterRevisions"];
};
"/v0/revisions/characters/{revision_id}": {
get: operations["getCharacterRevisionByRevisionId"];
};
"/v0/revisions/subjects": {
get: operations["getSubjectRevisions"];
};
"/v0/revisions/subjects/{revision_id}": {
get: operations["getSubjectRevisionByRevisionId"];
};
"/v0/revisions/episodes": {
get: operations["getEpisodeRevisions"];
};
"/v0/revisions/episodes/{revision_id}": {
get: operations["getEpisodeRevisionByRevisionId"];
};
"/v0/indices": {
post: operations["newIndex"];
};
"/v0/indices/{index_id}": {
get: operations["getIndexById"];
put: operations["editIndexById"];
};
"/v0/indices/{index_id}/subjects": {
get: operations["getIndexSubjectsByIndexId"];
post: operations["addSubjectToIndexByIndexId"];
};
"/v0/indices/{index_id}/subjects/{subject_id}": {
/** 如果条目不存在于目录,会创建该条目 */
put: operations["editIndexSubjectsByIndexIdAndSubjectID"];
delete: operations["delelteSubjectFromIndexByIndexIdAndSubjectID"];
};
"/v0/indices/{index_id}/collect": {
/** 为当前用户收藏一条目录 */
post: operations["collectIndexByIndexIdAndUserId"];
/** 为当前用户取消收藏一条目录 */
delete: operations["uncollectIndexByIndexIdAndUserId"];
};
}
export interface components {
schemas: {
/**
* @description 条目类型 <br> 1 = book <br> 2 = anime <br> 3 = music <br> 4 = game <br> 6 = real
* @example 2
* @enum {integer}
*/
Legacy_SubjectType: 1 | 2 | 3 | 4 | 6;
Legacy_SubjectSmall: {
/**
* @description 条目 ID
* @example 12
*/
id?: number;
/**
* @description 条目地址
* @example https://bgm.tv/subject/12
*/
url?: string;
/**
* SubjectType
* @description 条目类型
* - `1` 为 书籍
* - `2` 为 动画
* - `3` 为 音乐
* - `4` 为 游戏
* - `6` 为 三次元
*
* 没有 `5`
* @example 2
* @enum {integer}
*/
type?: 1 | 2 | 3 | 4 | 6;
/**
* @description 条目名称
* @example ちょびっツ
*/
name?: string;
/**
* @description 条目中文名称
* @example 人形电脑天使心
*/
name_cn?: string;
/**
* @description 剧情简介
* @example 在不久的将来,电子技术飞速发展,电脑成为人们生活中不可缺少的一部分.主角的名字是本须和秀树,是个19岁的少年,由于考试失败,来到东京上补习班,过着贫穷潦倒的生活……\r\n到达东京的第一天,他很幸运的在垃圾堆捡到一个人型电脑,一直以来秀树都非常渴望拥有个人电脑.当他抱着她带返公寓后,却不知如何开机,在意想不到的地方找到开关并开启后,故事就此展开\r\n本须和秀树捡到了人型计算机〔唧〕。虽然不晓得她到底是不是〔Chobits〕,但她的身上似乎藏有极大的秘密。看到秀树为了钱而烦恼,唧出去找打工,没想到却找到了危险的工作!为了让秀树开心,唧开始到色情小屋打工。但她在遭到过度激烈的强迫要求之后失控。让周遭计算机因此而强制停摆。\r\n另一方面,秀树发现好友新保与补习班的清水老师有着不可告人的关系……
*/
summary?: string;
/**
* @description 放送开始日期
* @example 2002-04-02
*/
air_date?: string;
/**
* @description 放送星期
* @example 2
*/
air_weekday?: number;
/** @description 封面 */
images?: {
/** @example https://lain.bgm.tv/pic/cover/l/c2/0a/12_24O6L.jpg */
large?: string;
/** @example https://lain.bgm.tv/pic/cover/c/c2/0a/12_24O6L.jpg */
common?: string;
/** @example https://lain.bgm.tv/pic/cover/m/c2/0a/12_24O6L.jpg */
medium?: string;
/** @example https://lain.bgm.tv/pic/cover/s/c2/0a/12_24O6L.jpg */
small?: string;
/** @example https://lain.bgm.tv/pic/cover/g/c2/0a/12_24O6L.jpg */
grid?: string;
};
/**
* @description 话数
* @example 27
*/
eps?: number;
/**
* @description 话数
* @example 27
*/
eps_count?: number;
/** @description 评分 */
rating?: {
/**
* @description 总评分人数
* @example 2289
*/
total?: number;
/** @description 各分值评分人数 */
count?: {
/** @example 5 */
"1"?: number;
/** @example 3 */
"2"?: number;
/** @example 4 */
"3"?: number;
/** @example 6 */
"4"?: number;
/** @example 46 */
"5"?: number;
/** @example 267 */
"6"?: number;
/** @example 659 */
"7"?: number;
/** @example 885 */
"8"?: number;
/** @example 284 */
"9"?: number;
/** @example 130 */
"10"?: number;
};
/**
* @description 评分
* @example 7.6
*/
score?: number;
};
/**
* @description 排名
* @example 573
*/
rank?: number;
/** @description 收藏人数 */
collection?: {
/**
* @description 想做
* @example 608
*/
wish?: number;
/**
* @description 做过
* @example 3010
*/
collect?: number;
/**
* @description 在做
* @example 103
*/
doing?: number;
/**
* @description 搁置
* @example 284
*/
on_hold?: number;
/**
* @description 抛弃
* @example 86
*/
dropped?: number;
};
};
Legacy_SubjectMedium: components["schemas"]["Legacy_SubjectSmall"] & {
/** @description 角色信息 */
crt?: (components["schemas"]["Legacy_Character"] & {
/**
* @description 角色类型
* @example 主角
*/
role_name?: string;
})[];
/** @description 制作人员信息 */
staff?: (components["schemas"]["Legacy_Person"] & {
/**
* @description 人物类型
* @example 主角
*/
role_name?: string;
/** @description 职位 */
jobs?: string[];
})[];
};
Legacy_SubjectLarge: components["schemas"]["Legacy_SubjectMedium"] & {
/** @description 章节列表 */
eps?: components["schemas"]["Legacy_Episode"][];
/** @description 讨论版 */
topic?: components["schemas"]["Legacy_Topic"][];
/** @description 评论日志 */
blog?: components["schemas"]["Legacy_Blog"][];
};
/**
* @description 章节类型 <br> 0 = 本篇 <br> 1 = 特别篇 <br> 2 = OP <br> 3 = ED <br> 4 = 预告/宣传/广告 <br> 5 = MAD <br> 6 = 其他
* @example 0
* @enum {integer}
*/
Legacy_EpisodeType: 0 | 1 | 2 | 3 | 4 | 5 | 6;
/** @description 章节信息 */
Legacy_Episode: {
/**
* @description 章节 ID
* @example 1027
*/
id?: number;
/**
* @description 章节地址
* @example https://bgm.tv/ep/1027
*/
url?: string;
type?: components["schemas"]["Legacy_EpisodeType"];
/**
* @description 集数
* @example 1
*/
sort?: number;
/**
* @description 标题
* @example ちぃ 目覚める
*/
name?: string;
/**
* @description 简体中文标题
* @example 叽,觉醒了
*/
name_cn?: string;
/**
* @description 时长
* @example 24m
*/
duration?: string;
/**
* @description 放送日期
* @example 2002-04-03
*/
airdate?: string;
/**
* @description 回复数量
* @example 9
*/
comment?: number;
/** @description 简介 */
desc?: string;
/**
* @description 放送状态 <br> Air = 已放送 <br> Today = 正在放送 <br> NA = 未放送
* @example Air
* @enum {string}
*/
status?: "Air" | "Today" | "NA";
};
/** @description 讨论版 */
Legacy_Topic: {
/** @description ID */
id?: number;
/** @description 地址 */
url?: string;
/** @description 标题 */
title?: string;
/** @description 所属对象(条目) ID */
main_id?: number;
/** @description 发布时间 */
timestamp?: number;
/** @description 最后回复时间 */
lastpost?: number;
/** @description 回复数 */
replies?: number;
user?: components["schemas"]["Legacy_User"];
};
/** @description 日志 */
Legacy_Blog: {
/** @description ID */
id?: number;
/** @description 地址 */
url?: string;
/** @description 标题 */
title?: string;
/** @description 概览 */
summary?: string;
/** @description 图片 */
image?: string;
/** @description 回复数 */
replies?: number;
/**
* @description 发布时间
* @example 1357144903
*/
timestamp?: number;
/**
* @description 发布时间
* @example 2013-1-2 16:41
*/
dateline?: string;
user?: components["schemas"]["Legacy_User"];
};
/** @description 用户信息 */
Legacy_User: {
/**
* @description 用户 id
* @example 1
*/
id?: number;
/**
* @description 用户主页地址
* @example https://bgm.tv/user/sai
*/
url?: string;
/**
* @description 用户名
* @example sai
*/
username?: string;
/**
* @description 昵称
* @example Sai
*/
nickname?: string;
/** @description 头像地址 */
avatar?: {
/** @example https://lain.bgm.tv/pic/user/l/000/00/00/1.jpg?r=1391790456 */
large?: string;
/** @example https://lain.bgm.tv/pic/user/m/000/00/00/1.jpg?r=1391790456 */
medium?: string;
/** @example https://lain.bgm.tv/pic/user/s/000/00/00/1.jpg?r=1391790456 */
small?: string;
};
/**
* @description 签名
* @example Awesome!
*/
sign?: string;
usergroup?: components["schemas"]["Legacy_UserGroup"];
};
/**
* @description 用户组 <br> 1 = 管理员 <br> 2 = Bangumi 管理猿 <br> 3 = 天窗管理猿 <br> 4 = 禁言用户 <br> 5 = 禁止访问用户 <br> 8 = 人物管理猿 <br> 9 = 维基条目管理猿 <br> 10 = 用户 <br> 11 = 维基人
* @example 11
* @enum {integer}
*/
Legacy_UserGroup: 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11;
/** @description 现实人物 */
Legacy_Person: components["schemas"]["Legacy_Mono"] & {
info?: components["schemas"]["Legacy_MonoInfo"];
};
/** @description 虚拟角色 */
Legacy_Character: components["schemas"]["Legacy_Mono"] & {
info?: components["schemas"]["Legacy_MonoInfo"];
/** @description 声优列表 */
actors?: components["schemas"]["Legacy_MonoBase"][];
};
/** @description 人物(基础模型) */
Legacy_MonoBase: {
/** @description 人物 ID */
id?: number;
/** @description 人物地址 */
url?: string;
/** @description 姓名 */
name?: string;
/** @description 肖像 */
images?: {
/** @example https://lain.bgm.tv/pic/crt/l/ce/65/32_crt_XMJOj.jpg */
large?: string;
/** @example https://lain.bgm.tv/pic/crt/m/ce/65/32_crt_XMJOj.jpg */
medium?: string;
/** @example https://lain.bgm.tv/pic/crt/s/ce/65/32_crt_XMJOj.jpg */
small?: string;
/** @example https://lain.bgm.tv/pic/crt/g/ce/65/32_crt_XMJOj.jpg */
grid?: string;
};
};
/** @description 人物 */
Legacy_Mono: components["schemas"]["Legacy_MonoBase"] & {
/** @description 简体中文名 */
name_cn?: string;
/** @description 回复数量 */
comment?: number;
/** @description 收藏人数 */
collects?: number;
};
/** @description 人物信息 */
Legacy_MonoInfo: {
/**
* @description 生日
* @example 4月13日
*/
birth?: string;
/**
* @description 身高
* @example 152cm
*/
height?: string;
/**
* @description 性别
* @example 女
*/
gender?: string;
/** @description 别名(另外添加出来的 key 为 0 开始的数字) */
alias?: {
/** @description 日文名 */
jp?: string;
/** @description 纯假名 */
kana?: string;
/** @description 昵称 */
nick?: string;
/** @description 罗马字 */
romaji?: string;
/** @description 第二中文名 */
zh?: string;
};
/** @description 引用来源 */
source?: string | string[];
/** @description 简体中文名 */
name_cn?: string;
/** @description 声优 */
cv?: string;
};
/**
* Subject ID
* @description 条目 ID
*/
SubjectID: number;
/**
* User
* @description 实际的返回值可能包括文档未声明的 `url` 字段,此字段主要用于开发者从 api 响应直接转跳到网页。
* 客户端开发者请不用依赖于此特性,此字段的值随时可能会改变。
*
* @example {
* "avatar": {
* "large": "https://lain.bgm.tv/pic/user/l/000/00/00/1.jpg?r=1391790456",
* "medium": "https://lain.bgm.tv/pic/user/m/000/00/00/1.jpg?r=1391790456",
* "small": "https://lain.bgm.tv/pic/user/s/000/00/00/1.jpg?r=1391790456"
* },
* "sign": "Awesome!",
* "username": "sai",
* "nickname": "Sai🖖",
* "id": 1,
* "user_group": 1
* }
*/
User: {
/** ID */
id: number;
/**
* Username
* @description 唯一用户名,初始与 UID 相同,可修改一次
*/
username: string;
/** Nickname */
nickname: string;
user_group: components["schemas"]["UserGroup"];
avatar: components["schemas"]["Avatar"];
/**
* Sign
* @description 个人签名
*/
sign: string;
};
/**
* Avatar
* @example {
* "large": "https://lain.bgm.tv/pic/user/l/000/00/00/1.jpg?r=1391790456",
* "medium": "https://lain.bgm.tv/pic/user/m/000/00/00/1.jpg?r=1391790456",
* "small": "https://lain.bgm.tv/pic/user/s/000/00/00/1.jpg?r=1391790456"
* }
*/
Avatar: {
/**
* Large
* Format: url
*/
large: string;
/**
* Medium
* Format: url
*/
medium: string;
/**
* Small
* Format: url
*/
small: string;
};
/**
* UserGroup
* @description 用户组 - 1 = 管理员 - 2 = Bangumi 管理猿 - 3 = 天窗管理猿 - 4 = 禁言用户 - 5 = 禁止访问用户 - 8 = 人物管理猿 - 9 = 维基条目管理猿 - 10 = 用户 - 11 = 维基人
* @enum {integer}
*/
UserGroup: 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11;
/**
* BloodType
* @description Blood type of a person. A, B, AB, O
* @enum {integer}
*/
BloodType: 1 | 2 | 3 | 4;
/** CharacterDetail */
CharacterDetail: {
/** ID */
id: number;
/** Name */
name: string;
/** @description 角色,机体,舰船,组织... */
type: number;
/**
* Images
* @description object with some size of images, this object maybe `null`
*/
images?: components["schemas"]["PersonImages"];
/** Summary */
summary: string;
/** Locked */
locked: boolean;
/**
* Infobox
* @description server parsed infobox, a map from key to string or tuple
* null if server infobox is not valid
*/
infobox?: { [key: string]: unknown }[];
/**
* Gender
* @description parsed from wiki, maybe null
*/
gender?: string;
/** @description parsed from wiki, maybe null, `1, 2, 3, 4` for `A, B, AB, O` */
blood_type?: number;
/**
* Birth Year
* @description parsed from wiki, maybe `null`
*/
birth_year?: number;
/**
* Birth Mon
* @description parsed from wiki, maybe `null`
*/
birth_mon?: number;
/**
* Birth Day
* @description parsed from wiki, maybe `null`
*/
birth_day?: number;
stat: components["schemas"]["Stat"];
};
/** CharacterPerson */
CharacterPerson: {
/** ID */
id: number;
/** Name */
name: string;
/** @description 角色,机体,舰船,组织... */
type: number;
/**
* Images
* @description object with some size of images, this object maybe `null`
*/
images?: components["schemas"]["PersonImages"];
/** Subject ID */
subject_id: number;
/** Subject Name */
subject_name: string;
/** Subject Name Cn */
subject_name_cn: string;
/** Staff */
staff?: string;
};
/**
* CharacterType
* @description type of a character 角色,机体,舰船,组织...
* @enum {integer}
*/
CharacterType: 1 | 2 | 3 | 4;
/**
* CollectionType
* @description - `1`: 想看
* - `2`: 看过
* - `3`: 在看
* - `4`: 搁置
* - `5`: 抛弃
* @example 3
* @enum {integer}
*/
SubjectCollectionType: 1 | 2 | 3 | 4 | 5;
/**
* EpisodeCollectionType
* @description - `0`: 未收藏
* - `1`: 想看
* - `2`: 看过
* - `3`: 抛弃
* @example 2
* @enum {integer}
*/
EpisodeCollectionType: 1 | 2 | 3;
/**
* Creator
* @description 意义同<a href="#model-Me">Me</a>
*/
Creator: {
/** Username */
username: string;
/** Nickname */
nickname: string;
};
/** DetailedRevision */
DetailedRevision: {
/** ID */
id: number;
/** Type */
type: number;
creator?: components["schemas"]["Creator"];
/** Summary */
summary: string;
/**
* Created At
* Format: date-time
*/
created_at: string;
/**
* Data
* @description 编辑修改内容,响应类型不固定
*/
data?: { [key: string]: unknown };
};
/** PersonRevision */
PersonRevision: components["schemas"]["Revision"] & {
/** Data */
data?: { [key: string]: components["schemas"]["PersonRevisionDataItem"] };
};
/** PersonRevisionDataItem */
PersonRevisionDataItem: {
/** Person Infobox */
prsn_infobox: string;
/** Person Summary */
prsn_summary: string;
profession: components["schemas"]["PersonRevisionProfession"];
extra: components["schemas"]["RevisionExtra"];
/** Person Name */
prsn_name: string;
};
/** PersonRevisionProfession */
PersonRevisionProfession: {
/** Producer */
producer?: string;
/** Mangaka */
mangaka?: string;
/** Artist */
artist?: string;
/** Seiyu */
seiyu?: string;
/** Writer */
writer?: string;
/** Illustrator */
illustrator?: string;
/** Actor */
actor?: string;
};
/** RevisionExtra */
RevisionExtra: {
/** Image */
img?: string;
};
/** SubjectRevision */
SubjectRevision: components["schemas"]["Revision"] & {
data?: components["schemas"]["SubjectRevisionData"];
};
/** SubjectRevisionData */
SubjectRevisionData: {
/** Field EPs */
field_eps: number;
/** Field Infobox */
field_infobox: string;
/** Field Summary */
field_summary: string;
/** Name */
name: string;
/** Name CN */
name_cn: string;
/** Platform */
platform: number;
/** Subject ID */
subject_id: number;
/** Type */
type: number;
/** Type ID */
type_id: number;
/** Vote Field */
vote_field: string;
};
/** CharacterRevision */
CharacterRevision: components["schemas"]["Revision"] & {
/** Data */
data?: {
[key: string]: components["schemas"]["CharacterRevisionDataItem"];
};
};
/** CharacterRevisionDataItem */
CharacterRevisionDataItem: {
/** Character Infobox */
infobox: string;
/** Character Summary */
summary: string;
/** Character Name */
name: string;
extra: components["schemas"]["RevisionExtra"];
};
/**
* EpType
* @description 本篇 = 0
* 特别篇 = 1
* OP = 2
* ED = 3
* 预告/宣传/广告 = 4
* MAD = 5
* 其他 = 6
* @enum {integer}
*/
EpType: 0 | 1 | 2 | 3 | 4 | 5 | 6;
/**
* Episode
* @example {
* "airdate": "",
* "comment": 0,
* "desc": "",
* "disc": 0,
* "duration": "",
* "ep": 6,
* "id": 8,
* "name": "蒼と白の境界線",
* "name_cn": "",
* "sort": 6,
* "subject_id": 15,
* "type": 0,
* "duration_seconds": 1440
* }
*/
Episode: {
/** ID */
id: number;
/**
* Type
* @description `0` 本篇,`1` SP,`2` OP,`3` ED
*/
type: number;
/** Name */
name: string;
/** Name Cn */
name_cn: string;
/**
* Sort
* @description 同类条目的排序和集数
*/
sort: number;
/**
* Ep
* @description 条目内的集数, 从`1`开始。非本篇剧集的此字段无意义
*/
ep?: number;
/** Airdate */
airdate: string;
/** Comment */
comment: number;
/**
* Duration
* @description 维基人填写的原始时长
*/
duration: string;
/**
* Desc
* @description 简介
*/
desc: string;
/**
* Disc
* @description 音乐曲目的碟片数
*/
disc: number;
/** @description 服务器解析的时长,无法解析时为 `0` */
duration_seconds?: number;
};
/** EpisodeDetail */
EpisodeDetail: {
/** ID */
id: number;
/**
* Type
* @description `0` 本篇,`1` SP,`2` OP,`3` ED
*/
type: number;
/** Name */
name: string;
/** Name Cn */
name_cn: string;
/**
* Sort
* @description 同类条目的排序和集数
*/
sort: number;
/**
* Ep
* @description 条目内的集数, 从`1`开始。非本篇剧集的此字段无意义
*/
ep?: number;
/** Airdate */
airdate: string;
/** Comment */
comment: number;
/** Duration */
duration: string;
/**
* Desc
* @description 简介
*/
desc: string;
/**
* Disc
* @description 音乐曲目的碟片数
*/
disc: number;
/** Subject ID */
subject_id: number;
};
/** ErrorDetail */
ErrorDetail: {
/** Title */
title: string;
/** Description */
description: string;
/** Detail */
details?:
| string
| {
/** @description error message */
error?: string;
/** @description request path */
path?: string;
};
};
/** Images */
Images: {
/** Large */
large: string;
/** Common */
common: string;
/** Medium */
medium: string;
/** Small */
small: string;
/** Grid */
grid: string;
};
/** Index */
Index: {
/** ID */
id: number;
/** Title */
title: string;
/** Desc */
desc: string;
/**
* Total
* @description 收录条目总数
* @default 0
*/
total?: number;
/**
* Stat
* @description 目录评论及收藏数
*/
stat: components["schemas"]["Stat"];
/**
* Created At
* Format: date-time
*/
created_at: string;
/**
* Updated At
* Format: date-time
*/
updated_at: string;
creator: components["schemas"]["Creator"];
/** Ban */
ban: boolean;
/** 目录是否包括 nsfw 条目 */
nsfw: boolean;
};
/**
* IndexSubject
* @description 同名字段意义同<a href="#model-Subject">Subject</a>
*/
IndexSubject: {
/** ID */
id: number;
/** Type */
type: number;
/** Name */
name: string;
images?: components["schemas"]["Images"];
infobox?: components["schemas"]["WikiV0"];
/** Date */
date?: string;
/** Comment */
comment: string;
/**
* Added At
* Format: date-time
*/
added_at: string;
};
/**
* IndexBasicInfo
* @description 新增或修改条目的内容,同名字段意义同<a href="#model-Subject">Subject</a>
*/
IndexBasicInfo: {
/** Title */
title?: string;
/** Description */
description?: string;
};
/**
* IndexBasicInfo
* @description 新增某条目到目录的请求信息
*/
IndexSubjectAddInfo: {
/** Subject ID */
subject_id?: number;
/**
* Sort
* @description 排序条件,越小越靠前
*/
sort?: number;
/** Comment */
comment?: string;
};
/**
* IndexBasicInfo
* @description 修改目录中条目的信息
*/
IndexSubjectEditInfo: {
/**
* Sort
* @description 排序条件,越小越靠前
*/
sort?: number;
/** Comment */
comment?: string;
};
/**
* Infobox
* @example [
* {
* "key": "简体中文名",
* "value": "鲁路修·兰佩路基"
* },
* {
* "key": "别名",
* "value": [
* {
* "v": "L.L."
* },
* {
* "v": "勒鲁什"
* },
* {
* "v": "鲁鲁修"
* },
* {
* "v": "ゼロ"
* },
* {
* "v": "Zero"
* },
* {
* "k": "英文名",
* "v": "Lelouch Lamperouge"
* },
* {
* "k": "第二中文名",
* "v": "鲁路修·冯·布里塔尼亚"
* },
* {
* "k": "英文名二",
* "v": "Lelouch Vie Britannia"
* },
* {
* "k": "日文名",
* "v": "ルルーシュ・ヴィ・ブリタニア"
* }
* ]
* },
* {
* "key": "性别",
* "value": "男"
* },
* {
* "key": "生日",
* "value": "12月5日"
* },
* {
* "key": "血型",
* "value": "A型"
* },
* {
* "key": "身高",
* "value": "178cm→181cm"
* },
* {
* "key": "体重",
* "value": "54kg"
* },
* {
* "key": "引用来源",
* "value": "Wikipedia"
* }
* ]
*/
WikiV0: {
/** Key */
key: string;
/** Value */
value: Partial<string> &
Partial<
(Partial<{
/** K */
k: string;
/** V */
v: string;
}> &
Partial<{
/** V */
v: string;
}>)[]
>;
}[];
Page: {
/** Total */
total: number;
/** Limit */
limit: number;
/** Offset */
offset: number;
};
/** Paged[Episode] */
Paged_Episode: {
/**
* Total
* @default 0
*/
total?: number;
/**
* Limit
* @default 0
*/
limit?: number;
/**
* Offset
* @default 0
*/
offset?: number;
/**
* Data
* @default []
*/
data?: components["schemas"]["Episode"][];
};
/** Paged[IndexSubject] */
Paged_IndexSubject: {
/**
* Total
* @default 0
*/
total?: number;
/**
* Limit
* @default 0
*/
limit?: number;
/**
* Offset
* @default 0
*/
offset?: number;
/**
* Data
* @default []
*/
data?: components["schemas"]["IndexSubject"][];
};
/** Paged[Revision] */
Paged_Revision: {
/**
* Total
* @default 0
*/
total?: number;
/**
* Limit
* @default 0
*/
limit?: number;
/**
* Offset
* @default 0
*/
offset?: number;
/**
* Data
* @default []
*/
data?: components["schemas"]["Revision"][];
};
/** Paged[UserCollection] */
Paged_UserCollection: {
/**
* Total
* @default 0
*/
total?: number;
/**
* Limit
* @default 0
*/
limit?: number;
/**
* Offset
* @default 0
*/
offset?: number;
/**
* Data
* @default []
*/
data?: components["schemas"]["UserSubjectCollection"][];
};
/** Person */
Person: {
/** ID */
id: number;
/** Name */
name: string;
/** @description `1`, `2`, `3` 表示 `个人`, `公司`, `组合` */
type: number;
career: components["schemas"]["PersonCareer"][];
/**
* Images
* @description object with some size of images, this object maybe `null`
*/
images?: components["schemas"]["PersonImages"];
/** Short Summary */
short_summary: string;
/** Locked */
locked: boolean;
};
/**
* PersonCareer
* @description An enumeration.
* @enum {string}
*/
PersonCareer:
| "producer"
| "mangaka"
| "artist"
| "seiyu"
| "writer"
| "illustrator"
| "actor";
/** PersonCharacter */
PersonCharacter: {
/** ID */
id: number;
/** Name */
name: string;
/** @description 角色,机体,舰船,组织... */
type: number;
/**
* Images
* @description object with some size of images, this object maybe `null`
*/
images?: components["schemas"]["PersonImages"];
/** Subject ID */
subject_id: number;
/** Subject Name */
subject_name: string;
/** Subject Name Cn */
subject_name_cn: string;
/** Staff */
staff?: string;
};
/** PersonDetail */
PersonDetail: {
/** ID */
id: number;
/** Name */
name: string;
/** @description `1`, `2`, `3` 表示 `个人`, `公司`, `组合` */
type: number;
career: components["schemas"]["PersonCareer"][];
/**
* Images
* @description object with some size of images, this object maybe `null`
*/
images?: components["schemas"]["PersonImages"];
/** Summary */
summary: string;
/** Locked */
locked: boolean;
/**
* Last Modified
* Format: date-time
* @description currently it's latest user comment time, it will be replaced by wiki modified date in the future
*/
last_modified: string;
/**
* Infobox
* @description server parsed infobox, a map from key to string or tuple
* null if server infobox is not valid
*/
infobox?: { [key: string]: unknown }[];
/**
* Gender
* @description parsed from wiki, maybe null
*/
gender?: string;
/** @description parsed from wiki, maybe null, `1, 2, 3, 4` for `A, B, AB, O` */
blood_type?: number;
/**
* Birth Year
* @description parsed from wiki, maybe `null`
*/
birth_year?: number;
/**
* Birth Mon
* @description parsed from wiki, maybe `null`
*/
birth_mon?: number;
/**
* Birth Day
* @description parsed from wiki, maybe `null`
*/
birth_day?: number;
stat: components["schemas"]["Stat"];
};
/** PersonImages */
PersonImages: {
/** Large */
large: string;
/** Medium */
medium: string;
/** Small */
small: string;
/** Grid */
grid: string;
};
/**
* PersonType
* @description `1`, `2`, `3` 表示 `个人`, `公司`, `组合`
* @enum {integer}
*/
PersonType: 1 | 2 | 3;
/** RelatedCharacter */
RelatedCharacter: {
/** ID */
id: number;
/** Name */
name: string;
/** @description 角色,机体,舰船,组织... */
type: number;
/**
* Images
* @description object with some size of images, this object maybe `null`
*/
images?: components["schemas"]["PersonImages"];
/** Relation */
relation: string;
/**
* Actors
* @description 演员列表
* @default []
*/
actors?: components["schemas"]["Person"][];
};
/** RelatedPerson */
RelatedPerson: {
/** ID */
id: number;
/** Name */
name: string;
/** @description `1`, `2`, `3` 表示 `个人`, `公司`, `组合` */
type: number;
career: components["schemas"]["PersonCareer"][];
/**
* Images
* @description object with some size of images, this object maybe `null`
*/
images?: components["schemas"]["PersonImages"];
/** Relation */
relation: string;
};
/** Revision */
Revision: {
/** ID */
id: number;
/** Type */
type: number;
creator?: components["schemas"]["Creator"];
/** Summary */
summary: string;
/**
* Created At
* Format: date-time
*/
created_at: string;
};
/** Stat */
Stat: {
/** Comments */
comments: number;
/** Collects */
collects: number;
};
/** Subject */
Subject: {
/** ID */
id: number;
/** Type */
type: number;
/** Name */
name: string;
/** Name Cn */
name_cn: string;
/** Summary */
summary: string;
/** Nsfw */
nsfw: boolean;
/** Locked */
locked: boolean;
/**
* Date
* @description air date in `YYYY-MM-DD` format
*/
date?: string;
/**
* Platform
* @description TV, Web, 欧美剧, PS4...
*/
platform: string;
images: components["schemas"]["Images"];
infobox?: components["schemas"]["WikiV0"];
/**
* Volumes
* @description 书籍条目的册数,由旧服务端从wiki中解析
*/
volumes: number;
/**
* Eps
* @description 由旧服务端从wiki中解析,对于书籍条目为`话数`
*/
eps: number;
/**
* Total Episodes
* @description 数据库中的章节数量
*/
total_episodes: number;
/** Rating */
rating: {
/** Rank */
rank: number;
/** Total */
total: number;
/** Count */
count: {
"1"?: number;
"2"?: number;
"3"?: number;
"4"?: number;
"5"?: number;
"6"?: number;
"7"?: number;
"8"?: number;
"9"?: number;
"10"?: number;
};
/** Score */
score: number;
};
/** Collection */
collection: {
/** Wish */
wish: number;
/** Collect */
collect: number;
/** Doing */
doing: number;
/** On Hold */
on_hold: number;
/** Dropped */
dropped: number;
};
tags: components["schemas"]["SubjectTags"];
};
/** SlimSubject */
SlimSubject: {
/** ID */
id: number;
/** Type */
type: number;
/** Name */
name: string;
/** Name Cn */
name_cn: string;
/**
* Summary
* @description 截短后的条目描述。
*/
short_summary: string;
/**
* Date
* @description air date in `YYYY-MM-DD` format
*/
date?: string;
images: components["schemas"]["Images"];
/**
* Volumes
* @description 书籍条目的册数,由旧服务端从wiki中解析
*/
volumes: number;
/**
* Eps
* @description 由旧服务端从wiki中解析,对于书籍条目为`话数`
*/
eps: number;
/**
* Total
* @description 收藏人数
*/
collection_total: number;
/**
* Total
* @description 分数
*/
score: number;
/** @description 前 10 个 tag */
tags: components["schemas"]["SubjectTags"];
} & {
rank: unknown;
};
/** Tags */
SubjectTags: {
/** Name */
name: string;
/** Count */
count: number;
}[];
/**
* SubjectType
* @description 条目类型
* - `1` 为 书籍
* - `2` 为 动画
* - `3` 为 音乐
* - `4` 为 游戏
* - `6` 为 三次元
*
* 没有 `5`
* @example 2
* @enum {integer}
*/
SubjectType: 1 | 2 | 3 | 4 | 6;
/** UserSubjectCollection */
UserSubjectCollection: {
/**
* Subject ID
* @example 8
*/
subject_id: number;
subject_type: components["schemas"]["SubjectType"];
/**
* Rate
* @example 4
*/
rate: number;
type: components["schemas"]["SubjectCollectionType"];
/**
* Comment
* @example 看看
*/
comment?: string;
/**
* Tags
* @example [
* "柯南",
* "万年小学生",
* "推理",
* "青山刚昌",
* "TV"
* ]
*/
tags: string[];
/**
* Ep Status
* @example 5
*/
ep_status: number;
/**
* Vol Status
* @example 0
*/
vol_status: number;
/**
* Updated At
* Format: date-time
* @description 本时间并不代表条目的收藏时间。修改评分,评价,章节观看状态等收藏信息时未更新此时间是一个 bug。请不要依赖此特性
* @example 2022-06-19T18:44:13.6140127+08:00
*/
updated_at: string;
/** Private */
private: boolean;
subject?: components["schemas"]["SlimSubject"];
};
UserEpisodeCollection: {
episode: components["schemas"]["Episode"];
type: components["schemas"]["EpisodeCollectionType"];
};
/** RelatedSubject */
v0_RelatedSubject: {
/** ID */
id: number;
/** Staff */
staff: string;
/** Name */
name?: string;
/** Name Cn */
name_cn: string;
/** Image */
image?: string;
};
/** SubjectRelation */
v0_subject_relation: {
/** ID */
id: number;
/** Type */
type: number;
/** Name */
name: string;
/** Name Cn */
name_cn: string;
images?: components["schemas"]["Images"];
/** Relation */
relation: string;
};
};
responses: {
/** Bad Request */
400: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
/** Unauthorized */
401: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
/** Not Found */
404: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
/** Internal Server Error */
500: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
/** Successful Response */
"200-no-content": unknown;
};
parameters: {
/** @description 条目 ID */
path_subject_id: components["schemas"]["SubjectID"];
/** @description 设置了用户名之后无法使用 UID。 */
path_username: string;
/** @description 章节 ID */
path_episode_id: number;
/** @description 角色 ID */
path_character_id: number;
/** @description 人物 ID */
path_person_id: number;
/** @description 目录 ID */
path_index_id: number;
/** @description 条目 ID */
query_subject_id: components["schemas"]["SubjectID"];
/** @description 分页参数 */
default_query_limit: number;
/** @description 分页参数 */
default_query_offset: number;
/** @description 版本 ID */
path_revision_id: number;
};
}
export interface operations {
getCalendar: {
responses: {
/** 每日放送 */
200: {
content: {
"application/json": {
weekday?: {
/** @example Mon */
en?: string;
/** @example 星期一 */
cn?: string;
/** @example 月耀日 */
ja?: string;
/** @example 1 */
id?: number;
};
items?: components["schemas"]["Legacy_SubjectSmall"][];
}[];
};
};
};
};
searchSubjectByKeywords: {
parameters: {
path: {
/** 关键词 <br> 需要 URL Encode */
keywords: string;
};
query: {
/** 条目类型,参考 [SubjectType](#model-Legacy_SubjectType) */
type?: components["schemas"]["Legacy_SubjectType"];
/** 返回数据大小 <br> 默认为 small */
responseGroup?: "small" | "medium" | "large";
/** 开始条数 */
start?: number;
/** 每页条数 <br> 最多 25 */
max_results?: number;
};
};
responses: {
/** 搜索结果 */
200: {
content: {
"application/json":
| {
/** @description 总条数 */
results?: number;
/** @description 结果列表 */
list?: components["schemas"]["Legacy_SubjectSmall"][];
}
| {
/** @description 总条数 */
results?: number;
/** @description 结果列表 */
list?: components["schemas"]["Legacy_SubjectMedium"][];
}
| {
/** @description 总条数 */
results?: number;
/** @description 结果列表 */
list?: components["schemas"]["Legacy_SubjectLarge"][];
};
};
};
};
};
/**
* ## 实验性 API, 本 schema 和实际的 API 行为都可能随时发生改动
*
* 目前支持的筛选条件包括:
* - `type`: 条目类型,参照 `SubjectType` enum, `或`。
* - `tag`: 标签,可以多次出现。`且` 关系。
* - `airdate`: 播出日期/发售日期。`且` 关系。
* - `rating`: 用于搜索指定评分的条目。`且` 关系。
* - `rank`: 用于搜索指定排名的条目。`且` 关系。
* - `nsfw`: 使用 `include` 包含NSFW搜索结果。默认排除搜索NSFW条目。无权限情况下忽略此选项,不会返回NSFW条目。
*
* 不同筛选条件之间为 `且`
*
*
* 由于目前 meilisearch 的一些问题,条目排名更新并不会触发搜索数据更新,所以条目排名可能是过期数据。
*
* 希望未来版本的 meilisearch 能解决相关的问题。
*/
searchSubjects: {
parameters: {
query: {
/** 分页参数 */
limit?: number;
/** 分页参数 */
offset?: number;
};
};
responses: {
/** 返回搜索结果 */
200: {
content: {
"application/json": {
/**
* @description 搜索结果数量
* @example 100
*/
total?: number;
/**
* @description 当前分页参数
* @example 100
*/
limit?: number;
/**
* @description 当前分页参数
* @example 100
*/
offset?: number;
data?: {
/**
* @description 条目ID
* @example 8
*/
id: number;
type?: components["schemas"]["SubjectType"];
/** @description 上映/开播/连载开始日期,可能为空字符串 */
date: string;
/**
* Format: url
* @description 封面
*/
image: string;
/** @description 条目描述 */
summary: string;
/** @description 条目原名 */
name: string;
/** @description 条目中文名 */
name_cn: string;
tags: components["schemas"]["SubjectTags"];
/** @description 评分 */
score: number;
/** @description 排名 */
rank: number;
}[];
};
};
};
};
requestBody: {
content: {
"application/json": {
keyword: string;
/**
* @description 排序规则
*
* - `match` meilisearch 的默认排序,按照匹配程度
* - `heat` 收藏人数
* - `rank` 排名由高到低
* - `score` 评分
*
* @default match
* @example rank
* @enum {string}
*/
sort?: "match" | "heat" | "rank" | "score";
/** @description 不同条件之间是 `且` 的关系 */
filter?: {
/** @description 条目类型,参照 `SubjectType` enum,多值之间为 `或` 的关系。 */
type?: components["schemas"]["SubjectType"][];
/**
* @description 标签,可以多次出现。多值之间为 `且` 关系。
* @example [
* "童年",
* "原创"
* ]
*/
tag?: string[];
/**
* @description 播出日期/发售日期,日期必需为 `YYYY-MM-DD` 格式。多值之间为 `且` 关系。
* @example [
* ">=2020-07-01",
* "<2020-10-01"
* ]
*/
air_date?: string[];
/**
* @description 用于搜索指定评分的条目,多值之间为 `且` 关系。
* @example [
* ">=6",
* "<8"
* ]
*/
rating?: string[];
/**
* @description 用于搜索指定排名的条目,多值之间为 `且` 关系。
* @example [
* ">10",
* "<=18"
* ]
*/
rank?: string[];
/**
* @description 无权限的用户会直接忽略此字段,不会返回R18条目。
*
* 默认或者 `null` 会返回包含 R18 的所有搜索结果。
*
* `true` 只会返回 R18 条目。
*
* `false` 只会返回非 R18 条目。
*/
nsfw?: boolean;
};
};
};
};
};
/** cache with 300s */
getSubjectById: {
parameters: {
path: {
/** 条目 ID */
subject_id: components["parameters"]["path_subject_id"];
};
};
responses: {
/** Successful Response */
200: {
content: {
"application/json": components["schemas"]["Subject"];
};
};
/** Validation Error */
400: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
/** Not Found */
404: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
};
};
getSubjectImageById: {
parameters: {
path: {
/** 条目 ID */
subject_id: components["parameters"]["path_subject_id"];
};
query: {
/** 枚举值 {small|grid|large|medium|common} */
type: string;
};
};
responses: {
/** Successful Response */
302: never;
/** Validation Error */
400: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
/** Not Found */
404: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
};
};
getRelatedPersonsBySubjectId: {
parameters: {
path: {
/** 条目 ID */
subject_id: components["parameters"]["path_subject_id"];
};
};
responses: {
/** Successful Response */
200: {
content: {
"application/json": components["schemas"]["RelatedPerson"][];
};
};
/** Validation Error */
400: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
/** Not Found */
404: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
};
};
getRelatedCharactersBySubjectId: {
parameters: {
path: {
/** 条目 ID */
subject_id: components["parameters"]["path_subject_id"];
};
};
responses: {
/** Successful Response */
200: {
content: {
"application/json": components["schemas"]["RelatedCharacter"][];
};
};
/** Validation Error */
400: {
content: {
"application/json": components["schemas"]["ErrorDetail"];
};
};
/** Not Found */
404: {
content: {
"application/