函数 validateBilibiliParams
validateBilibiliParams< T extends | "单个视频作品数据" | "单个视频下载信息数据" | "评论数据" | "用户主页数据" | "用户主页动态列表数据" | "获取UP主总播放量" | "Emoji数据" | "番剧基本信息数据" | "番剧下载信息数据" | "动态详情数据" | "动态卡片数据" | "直播间信息" | "直播间初始化信息" | "登录基本信息" | "申请二维码" | "二维码状态" | "AV转BV" | "BV转AV",>( methodType: T, params: unknown,): | { methodType: "单个视频作品数据"; bvid: string } | { methodType: "单个视频下载信息数据"; avid: number; cid: number } | { methodType: "评论数据"; type: number; oid: string; number?: number; mode?: 0 | 1 | 2 | 3; pagination_str?: string; plat?: number; seek_rpid?: string; web_location?: string; } | { methodType: "用户主页数据" | "用户主页动态列表数据" | "获取UP主总播放量"; host_mid: number } | { methodType: "Emoji数据" } | { methodType: "番剧基本信息数据"; season_id?: string; ep_id?: string } | { methodType: "番剧下载信息数据"; cid: number; ep_id: string } | { methodType: "动态详情数据" | "动态卡片数据"; dynamic_id: string } | { methodType: "直播间信息" | "直播间初始化信息"; room_id: string } | { methodType: "登录基本信息" } | { methodType: "申请二维码" } | { methodType: "二维码状态"; qrcode_key: string } | { methodType: "AV转BV"; avid: number } | { methodType: "BV转AV"; bvid: string } 类型参数
- T extends
| "单个视频作品数据"
| "单个视频下载信息数据"
| "评论数据"
| "用户主页数据"
| "用户主页动态列表数据"
| "获取UP主总播放量"
| "Emoji数据"
| "番剧基本信息数据"
| "番剧下载信息数据"
| "动态详情数据"
| "动态卡片数据"
| "直播间信息"
| "直播间初始化信息"
| "登录基本信息"
| "申请二维码"
| "二维码状态"
| "AV转BV"
| "BV转AV"
参数
- methodType: T
- params: unknown
返回
| { methodType: "单个视频作品数据"; bvid: string }
| { methodType: "单个视频下载信息数据"; avid: number; cid: number }
| {
methodType: "评论数据";
type: number;
oid: string;
number?: number;
mode?: 0 | 1 | 2 | 3;
pagination_str?: string;
plat?: number;
seek_rpid?: string;
web_location?: string;
}
| { methodType: "用户主页数据"
| "用户主页动态列表数据"
| "获取UP主总播放量"; host_mid: number }
| { methodType: "Emoji数据" }
| { methodType: "番剧基本信息数据"; season_id?: string; ep_id?: string }
| { methodType: "番剧下载信息数据"; cid: number; ep_id: string }
| { methodType: "动态详情数据" | "动态卡片数据"; dynamic_id: string }
| { methodType: "直播间信息" | "直播间初始化信息"; room_id: string }
| { methodType: "登录基本信息" }
| { methodType: "申请二维码" }
| { methodType: "二维码状态"; qrcode_key: string }
| { methodType: "AV转BV"; avid: number }
| { methodType: "BV转AV"; bvid: string }
验证后的参数,符合原始API期望的类型
- { methodType: "单个视频作品数据"; bvid: string }
methodType: "单个视频作品数据"
bvid: string
- { methodType: "单个视频下载信息数据"; avid: number; cid: number }
methodType: "单个视频下载信息数据"
avid: number
cid: number
- {
methodType: "评论数据";
type: number;
oid: string;
number?: number;
mode?: 0 | 1 | 2 | 3;
pagination_str?: string;
plat?: number;
seek_rpid?: string;
web_location?: string;
}methodType: "评论数据"
type: number
oid: string
可选
number?: number
可选
mode?: 0 | 1 | 2 | 3
可选
pagination_str?: string
可选
plat?: number
可选
seek_rpid?: string
可选
web_location?: string
- { methodType: "用户主页数据" | "用户主页动态列表数据" | "获取UP主总播放量"; host_mid: number }
methodType: "用户主页数据" | "用户主页动态列表数据" | "获取UP主总播放量"
host_mid: number
- { methodType: "Emoji数据" }
- { methodType: "番剧基本信息数据"; season_id?: string; ep_id?: string }
methodType: "番剧基本信息数据"
可选
season_id?: string
可选
ep_id?: string
- { methodType: "番剧下载信息数据"; cid: number; ep_id: string }
methodType: "番剧下载信息数据"
cid: number
ep_id: string
- { methodType: "动态详情数据" | "动态卡片数据"; dynamic_id: string }
methodType: "动态详情数据" | "动态卡片数据"
dynamic_id: string
- { methodType: "直播间信息" | "直播间初始化信息"; room_id: string }
methodType: "直播间信息" | "直播间初始化信息"
room_id: string
- { methodType: "登录基本信息" }
- { methodType: "申请二维码" }
- { methodType: "二维码状态"; qrcode_key: string }
methodType: "二维码状态"
qrcode_key: string
- { methodType: "AV转BV"; avid: number }
methodType: "AV转BV"
avid: number
- { methodType: "BV转AV"; bvid: string }
methodType: "BV转AV"
bvid: string
验证哔哩哔哩参数