@ikenxuan/amagi 6.2.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/default/index.cjs +45 -1
- package/dist/default/index.d.ts +109 -54
- package/dist/default/index.mjs +45 -1
- package/package.json +1 -1
package/dist/default/index.cjs
CHANGED
|
@@ -541,6 +541,15 @@ var BilibiliAPI = class {
|
|
|
541
541
|
getUserCard(data) {
|
|
542
542
|
return `https://api.bilibili.com/x/web-interface/card?mid=${data.host_mid}&photo=true`;
|
|
543
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* 按用户 UID 获取直播状态。
|
|
546
|
+
*
|
|
547
|
+
* @remarks
|
|
548
|
+
* 该接口直接返回用户当前直播状态,不依赖空间动态中的直播推荐卡片。
|
|
549
|
+
*/
|
|
550
|
+
getUserLiveStatus(data) {
|
|
551
|
+
return `https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${data.host_mid}`;
|
|
552
|
+
}
|
|
544
553
|
/** 获取直播间信息 */
|
|
545
554
|
getLiveRoomInfo(data) {
|
|
546
555
|
return `https://api.live.bilibili.com/room/v1/Room/get_info?room_id=${data.room_id}`;
|
|
@@ -986,6 +995,7 @@ const BilibiliUserParamsSchema = zod.default.object({
|
|
|
986
995
|
methodType: zod.default.enum([
|
|
987
996
|
"userCard",
|
|
988
997
|
"userDynamicList",
|
|
998
|
+
"userLiveStatus",
|
|
989
999
|
"uploaderTotalViews",
|
|
990
1000
|
"userSpaceInfo"
|
|
991
1001
|
], { error: "方法类型必须是指定的枚举值之一" }),
|
|
@@ -1086,6 +1096,7 @@ const BilibiliValidationSchemas = {
|
|
|
1086
1096
|
commentReplies: BilibiliCommentReplyParamsSchema,
|
|
1087
1097
|
userCard: BilibiliUserParamsSchema,
|
|
1088
1098
|
userDynamicList: BilibiliUserParamsSchema,
|
|
1099
|
+
userLiveStatus: BilibiliUserParamsSchema,
|
|
1089
1100
|
userSpaceInfo: BilibiliUserParamsSchema,
|
|
1090
1101
|
emojiList: BilibiliEmojiParamsSchema,
|
|
1091
1102
|
bangumiInfo: BilibiliBangumiInfoParamsSchema,
|
|
@@ -1116,6 +1127,7 @@ const BilibiliMethodRoutes = {
|
|
|
1116
1127
|
commentReplies: "/fetch_comment_reply",
|
|
1117
1128
|
userCard: "/fetch_user_profile",
|
|
1118
1129
|
userDynamicList: "/fetch_user_dynamic",
|
|
1130
|
+
userLiveStatus: "/fetch_user_live_status",
|
|
1119
1131
|
userSpaceInfo: "/fetch_user_space_info",
|
|
1120
1132
|
emojiList: "/fetch_emoji_list",
|
|
1121
1133
|
bangumiInfo: "/fetch_bangumi_video_info",
|
|
@@ -2387,6 +2399,27 @@ async function fetchUserDynamicList(options, cookie, requestConfig) {
|
|
|
2387
2399
|
});
|
|
2388
2400
|
}
|
|
2389
2401
|
/**
|
|
2402
|
+
* 按用户 UID 获取B站直播状态
|
|
2403
|
+
* @param options - 用户参数
|
|
2404
|
+
* @param options.host_mid - 用户 UID
|
|
2405
|
+
* @param cookie - B站 Cookie (可选)
|
|
2406
|
+
* @param requestConfig - 请求配置 (可选)
|
|
2407
|
+
* @returns 用户直播状态与直播间基础信息
|
|
2408
|
+
* @example
|
|
2409
|
+
* ```typescript
|
|
2410
|
+
* const result = await fetchUserLiveStatus({ host_mid: 123456, typeMode: 'strict' }, cookie)
|
|
2411
|
+
* if (result.success && result.data.data.liveStatus === 1) {
|
|
2412
|
+
* console.log(result.data.data.roomid) // 正在直播的房间 ID
|
|
2413
|
+
* }
|
|
2414
|
+
* ```
|
|
2415
|
+
*/
|
|
2416
|
+
async function fetchUserLiveStatus(options, cookie, requestConfig) {
|
|
2417
|
+
return fetchBilibiliInternal("userLiveStatus", options, {
|
|
2418
|
+
cookie,
|
|
2419
|
+
requestConfig
|
|
2420
|
+
});
|
|
2421
|
+
}
|
|
2422
|
+
/**
|
|
2390
2423
|
* 获取B站用户空间详细信息
|
|
2391
2424
|
* @param options - 用户参数
|
|
2392
2425
|
* @param options.host_mid - 用户 UID
|
|
@@ -2567,6 +2600,7 @@ function createBoundBilibiliFetcher(cookie, requestConfig) {
|
|
|
2567
2600
|
fetchCommentReplies: (options) => fetchCommentReplies$1(options, cookie, requestConfig),
|
|
2568
2601
|
fetchUserCard: (options) => fetchUserCard(options, cookie, requestConfig),
|
|
2569
2602
|
fetchUserDynamicList: (options) => fetchUserDynamicList(options, cookie, requestConfig),
|
|
2603
|
+
fetchUserLiveStatus: (options) => fetchUserLiveStatus(options, cookie, requestConfig),
|
|
2570
2604
|
fetchUserSpaceInfo: (options) => fetchUserSpaceInfo(options, cookie, requestConfig),
|
|
2571
2605
|
fetchUploaderTotalViews: (options) => fetchUploaderTotalViews(options, cookie, requestConfig),
|
|
2572
2606
|
fetchDynamicDetail: (options) => fetchDynamicDetail(options, cookie, requestConfig),
|
|
@@ -2614,6 +2648,7 @@ const bilibiliFetcher = {
|
|
|
2614
2648
|
fetchCommentReplies: fetchCommentReplies$1,
|
|
2615
2649
|
fetchUserCard,
|
|
2616
2650
|
fetchUserDynamicList,
|
|
2651
|
+
fetchUserLiveStatus,
|
|
2617
2652
|
fetchUserSpaceInfo,
|
|
2618
2653
|
fetchUploaderTotalViews,
|
|
2619
2654
|
fetchDynamicDetail,
|
|
@@ -8670,6 +8705,10 @@ const fetchBilibili = async (data, cookie, requestConfig) => {
|
|
|
8670
8705
|
url: bilibiliApiUrls.getUserCard({ host_mid })
|
|
8671
8706
|
});
|
|
8672
8707
|
}
|
|
8708
|
+
case "userLiveStatus": return await GlobalGetData(data.methodType, {
|
|
8709
|
+
...baseRequestConfig,
|
|
8710
|
+
url: bilibiliApiUrls.getUserLiveStatus({ host_mid: data.host_mid })
|
|
8711
|
+
});
|
|
8673
8712
|
case "userSpaceInfo": {
|
|
8674
8713
|
const wbiSignQuery = await wbi_sign(bilibiliApiUrls.getUserSpaceInfo({ host_mid: data.host_mid }), baseRequestConfig.headers?.cookie);
|
|
8675
8714
|
return await GlobalGetData(data.methodType, {
|
|
@@ -9755,6 +9794,7 @@ const BilibiliInternalMethods = {
|
|
|
9755
9794
|
COMMENT_REPLIES: "指定评论的回复",
|
|
9756
9795
|
USER_CARD: "用户主页数据",
|
|
9757
9796
|
USER_DYNAMICS: "用户主页动态列表数据",
|
|
9797
|
+
USER_LIVE_STATUS: "用户直播状态",
|
|
9758
9798
|
USER_SPACE_INFO: "用户空间详细信息",
|
|
9759
9799
|
USER_TOTAL_VIEWS: "获取UP主总播放量",
|
|
9760
9800
|
DYNAMIC_DETAIL: "动态详情数据",
|
|
@@ -9785,6 +9825,7 @@ const BilibiliFetcherMethods = {
|
|
|
9785
9825
|
COMMENT_REPLIES: "fetchCommentReplies",
|
|
9786
9826
|
USER_CARD: "fetchUserCard",
|
|
9787
9827
|
USER_DYNAMICS: "fetchUserDynamicList",
|
|
9828
|
+
USER_LIVE_STATUS: "fetchUserLiveStatus",
|
|
9788
9829
|
USER_SPACE_INFO: "fetchUserSpaceInfo",
|
|
9789
9830
|
USER_TOTAL_VIEWS: "fetchUploaderTotalViews",
|
|
9790
9831
|
DYNAMIC_DETAIL: "fetchDynamicDetail",
|
|
@@ -9893,6 +9934,7 @@ const BilibiliMethodToFetcher = {
|
|
|
9893
9934
|
[BilibiliInternalMethods.COMMENT_REPLIES]: BilibiliFetcherMethods.COMMENT_REPLIES,
|
|
9894
9935
|
[BilibiliInternalMethods.USER_CARD]: BilibiliFetcherMethods.USER_CARD,
|
|
9895
9936
|
[BilibiliInternalMethods.USER_DYNAMICS]: BilibiliFetcherMethods.USER_DYNAMICS,
|
|
9937
|
+
[BilibiliInternalMethods.USER_LIVE_STATUS]: BilibiliFetcherMethods.USER_LIVE_STATUS,
|
|
9896
9938
|
[BilibiliInternalMethods.USER_SPACE_INFO]: BilibiliFetcherMethods.USER_SPACE_INFO,
|
|
9897
9939
|
[BilibiliInternalMethods.USER_TOTAL_VIEWS]: BilibiliFetcherMethods.USER_TOTAL_VIEWS,
|
|
9898
9940
|
[BilibiliInternalMethods.DYNAMIC_DETAIL]: BilibiliFetcherMethods.DYNAMIC_DETAIL,
|
|
@@ -10024,6 +10066,7 @@ const BilibiliMethodMapping = {
|
|
|
10024
10066
|
指定评论的回复: "fetchCommentReplies",
|
|
10025
10067
|
用户主页数据: "fetchUserCard",
|
|
10026
10068
|
用户主页动态列表数据: "fetchUserDynamicList",
|
|
10069
|
+
用户直播状态: "fetchUserLiveStatus",
|
|
10027
10070
|
用户空间详细信息: "fetchUserSpaceInfo",
|
|
10028
10071
|
获取UP主总播放量: "fetchUploaderTotalViews",
|
|
10029
10072
|
动态详情数据: "fetchDynamicDetail",
|
|
@@ -10106,6 +10149,7 @@ const BilibiliApiRoutes = {
|
|
|
10106
10149
|
commentReplies: "/comment-replies",
|
|
10107
10150
|
userCard: "/user",
|
|
10108
10151
|
userDynamicList: "/user/dynamics",
|
|
10152
|
+
userLiveStatus: "/user/live-status",
|
|
10109
10153
|
userSpaceInfo: "/user/space",
|
|
10110
10154
|
uploaderTotalViews: "/user/total-views",
|
|
10111
10155
|
dynamicDetail: "/dynamic",
|
|
@@ -10179,7 +10223,7 @@ function getApiRoute(platform, methodType) {
|
|
|
10179
10223
|
* 构建后使用 __VERSION__,开发环境从 package.json 读取
|
|
10180
10224
|
*/
|
|
10181
10225
|
const getVersion = () => {
|
|
10182
|
-
return "6.
|
|
10226
|
+
return "6.3.0";
|
|
10183
10227
|
};
|
|
10184
10228
|
const VERSION = getVersion();
|
|
10185
10229
|
/**
|
package/dist/default/index.d.ts
CHANGED
|
@@ -31,11 +31,11 @@ declare const bv2av: (bvid: string) => number;
|
|
|
31
31
|
//#region src/types/ReturnDataType/Bilibili/ProtobufDanmaku/ProtobufDanmaku_V0.d.ts
|
|
32
32
|
type BiliProtobufDanmaku_V0 = {
|
|
33
33
|
code: number;
|
|
34
|
-
data: DataData$
|
|
34
|
+
data: DataData$30;
|
|
35
35
|
message: string;
|
|
36
36
|
[property: string]: any;
|
|
37
37
|
};
|
|
38
|
-
type DataData$
|
|
38
|
+
type DataData$30 = {
|
|
39
39
|
elems: Elem[];
|
|
40
40
|
[property: string]: any;
|
|
41
41
|
};
|
|
@@ -143,7 +143,7 @@ interface BilibiliMethodOptionsMap {
|
|
|
143
143
|
};
|
|
144
144
|
/** 获取用户相关数据 */
|
|
145
145
|
UserParams: {
|
|
146
|
-
methodType: 'userCard' | 'userDynamicList' | 'uploaderTotalViews' | 'userSpaceInfo'; /** UP主UID */
|
|
146
|
+
methodType: 'userCard' | 'userDynamicList' | 'userLiveStatus' | 'uploaderTotalViews' | 'userSpaceInfo'; /** UP主UID */
|
|
147
147
|
host_mid: number;
|
|
148
148
|
};
|
|
149
149
|
/** 获取动态数据 */
|
|
@@ -331,6 +331,7 @@ type BilibiliMethodOptMap = {
|
|
|
331
331
|
commentReplies: BilibiliMethodOptionsMap['CommentReplyParams'];
|
|
332
332
|
userCard: BilibiliMethodOptionsMap['UserParams'];
|
|
333
333
|
userDynamicList: BilibiliMethodOptionsMap['UserParams'];
|
|
334
|
+
userLiveStatus: BilibiliMethodOptionsMap['UserParams'];
|
|
334
335
|
userSpaceInfo: BilibiliMethodOptionsMap['UserParams'];
|
|
335
336
|
uploaderTotalViews: BilibiliMethodOptionsMap['UserParams'];
|
|
336
337
|
emojiList: BilibiliMethodOptionsMap['EmojiParams'];
|
|
@@ -452,24 +453,31 @@ declare const BilibiliValidationSchemas: {
|
|
|
452
453
|
number?: number;
|
|
453
454
|
}, unknown>>;
|
|
454
455
|
readonly userCard: zod.ZodType<{
|
|
455
|
-
methodType: "userCard" | "userDynamicList" | "uploaderTotalViews" | "userSpaceInfo";
|
|
456
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
456
457
|
host_mid: number;
|
|
457
458
|
}, unknown, zod.core.$ZodTypeInternals<{
|
|
458
|
-
methodType: "userCard" | "userDynamicList" | "uploaderTotalViews" | "userSpaceInfo";
|
|
459
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
459
460
|
host_mid: number;
|
|
460
461
|
}, unknown>>;
|
|
461
462
|
readonly userDynamicList: zod.ZodType<{
|
|
462
|
-
methodType: "userCard" | "userDynamicList" | "uploaderTotalViews" | "userSpaceInfo";
|
|
463
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
463
464
|
host_mid: number;
|
|
464
465
|
}, unknown, zod.core.$ZodTypeInternals<{
|
|
465
|
-
methodType: "userCard" | "userDynamicList" | "uploaderTotalViews" | "userSpaceInfo";
|
|
466
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
467
|
+
host_mid: number;
|
|
468
|
+
}, unknown>>;
|
|
469
|
+
readonly userLiveStatus: zod.ZodType<{
|
|
470
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
471
|
+
host_mid: number;
|
|
472
|
+
}, unknown, zod.core.$ZodTypeInternals<{
|
|
473
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
466
474
|
host_mid: number;
|
|
467
475
|
}, unknown>>;
|
|
468
476
|
readonly userSpaceInfo: zod.ZodType<{
|
|
469
|
-
methodType: "userCard" | "userDynamicList" | "uploaderTotalViews" | "userSpaceInfo";
|
|
477
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
470
478
|
host_mid: number;
|
|
471
479
|
}, unknown, zod.core.$ZodTypeInternals<{
|
|
472
|
-
methodType: "userCard" | "userDynamicList" | "uploaderTotalViews" | "userSpaceInfo";
|
|
480
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
473
481
|
host_mid: number;
|
|
474
482
|
}, unknown>>;
|
|
475
483
|
readonly emojiList: zod.ZodType<{
|
|
@@ -541,10 +549,10 @@ declare const BilibiliValidationSchemas: {
|
|
|
541
549
|
qrcode_key: string;
|
|
542
550
|
}, unknown>>;
|
|
543
551
|
readonly uploaderTotalViews: zod.ZodType<{
|
|
544
|
-
methodType: "userCard" | "userDynamicList" | "uploaderTotalViews" | "userSpaceInfo";
|
|
552
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
545
553
|
host_mid: number;
|
|
546
554
|
}, unknown, zod.core.$ZodTypeInternals<{
|
|
547
|
-
methodType: "userCard" | "userDynamicList" | "uploaderTotalViews" | "userSpaceInfo";
|
|
555
|
+
methodType: "userCard" | "userDynamicList" | "userLiveStatus" | "uploaderTotalViews" | "userSpaceInfo";
|
|
548
556
|
host_mid: number;
|
|
549
557
|
}, unknown>>;
|
|
550
558
|
readonly avToBv: zod.ZodType<{
|
|
@@ -631,6 +639,7 @@ declare const BilibiliMethodRoutes: {
|
|
|
631
639
|
readonly commentReplies: "/fetch_comment_reply";
|
|
632
640
|
readonly userCard: "/fetch_user_profile";
|
|
633
641
|
readonly userDynamicList: "/fetch_user_dynamic";
|
|
642
|
+
readonly userLiveStatus: "/fetch_user_live_status";
|
|
634
643
|
readonly userSpaceInfo: "/fetch_user_space_info";
|
|
635
644
|
readonly emojiList: "/fetch_emoji_list";
|
|
636
645
|
readonly bangumiInfo: "/fetch_bangumi_video_info";
|
|
@@ -1758,12 +1767,12 @@ declare const createErrorResponse: (error: APIErrorType, message: string, code?:
|
|
|
1758
1767
|
//#region src/types/ReturnDataType/Bilibili/ArticleCard/ArticleCard_V0.d.ts
|
|
1759
1768
|
type ArticleCard_V0 = {
|
|
1760
1769
|
code: number;
|
|
1761
|
-
data: DataData$
|
|
1770
|
+
data: DataData$29;
|
|
1762
1771
|
message: string;
|
|
1763
1772
|
ttl: number;
|
|
1764
1773
|
[property: string]: any;
|
|
1765
1774
|
};
|
|
1766
|
-
type DataData$
|
|
1775
|
+
type DataData$29 = {
|
|
1767
1776
|
av2: Av2;
|
|
1768
1777
|
cv1: Cv1;
|
|
1769
1778
|
cv2: Cv2;
|
|
@@ -2125,12 +2134,12 @@ type ArticleCard = ArticleCard_V0;
|
|
|
2125
2134
|
//#region src/types/ReturnDataType/Bilibili/ArticleContent/ArticleContent.d.ts
|
|
2126
2135
|
type ArticleContent_V0 = {
|
|
2127
2136
|
code: number;
|
|
2128
|
-
data: DataData$
|
|
2137
|
+
data: DataData$28;
|
|
2129
2138
|
message: string;
|
|
2130
2139
|
ttl: number;
|
|
2131
2140
|
[property: string]: any;
|
|
2132
2141
|
};
|
|
2133
|
-
type DataData$
|
|
2142
|
+
type DataData$28 = {
|
|
2134
2143
|
act_id: number;
|
|
2135
2144
|
apply_time: string;
|
|
2136
2145
|
authenMark: null;
|
|
@@ -2345,12 +2354,12 @@ type ArticleContent = ArticleContent_V0;
|
|
|
2345
2354
|
//#region src/types/ReturnDataType/Bilibili/ArticleInfo/ArticleInfo_V0.d.ts
|
|
2346
2355
|
type ArticleInfo_V0 = {
|
|
2347
2356
|
code: number;
|
|
2348
|
-
data: DataData$
|
|
2357
|
+
data: DataData$27;
|
|
2349
2358
|
message: string;
|
|
2350
2359
|
ttl: number;
|
|
2351
2360
|
[property: string]: any;
|
|
2352
2361
|
};
|
|
2353
|
-
type DataData$
|
|
2362
|
+
type DataData$27 = {
|
|
2354
2363
|
attention: boolean;
|
|
2355
2364
|
author_name: string;
|
|
2356
2365
|
banner_url: string;
|
|
@@ -3134,12 +3143,12 @@ type BiliEmojiList = BiliEmojiList_V0;
|
|
|
3134
3143
|
//#region src/types/ReturnDataType/Bilibili/BiliCommentReply/BiliCommentReply_V0.d.ts
|
|
3135
3144
|
type BiliCommentReply_V0 = {
|
|
3136
3145
|
code: number;
|
|
3137
|
-
data: DataData$
|
|
3146
|
+
data: DataData$26;
|
|
3138
3147
|
message: string;
|
|
3139
3148
|
ttl: number;
|
|
3140
3149
|
[property: string]: any;
|
|
3141
3150
|
};
|
|
3142
|
-
type DataData$
|
|
3151
|
+
type DataData$26 = {
|
|
3143
3152
|
assist: number;
|
|
3144
3153
|
blacklist: number;
|
|
3145
3154
|
callbacks: {
|
|
@@ -3650,12 +3659,12 @@ type BiliBv2AV = BiliBv2AV_V0;
|
|
|
3650
3659
|
//#region src/types/ReturnDataType/Bilibili/Captcha/ApplyCaptcha/ApplyCaptcha_V0.d.ts
|
|
3651
3660
|
type ApplyCaptcha_V0 = {
|
|
3652
3661
|
code: number;
|
|
3653
|
-
data: DataData$
|
|
3662
|
+
data: DataData$25;
|
|
3654
3663
|
message: string;
|
|
3655
3664
|
ttl: number;
|
|
3656
3665
|
[property: string]: any;
|
|
3657
3666
|
};
|
|
3658
|
-
type DataData$
|
|
3667
|
+
type DataData$25 = {
|
|
3659
3668
|
biliword: null;
|
|
3660
3669
|
geetest: Geetest;
|
|
3661
3670
|
phone: null;
|
|
@@ -3677,12 +3686,12 @@ type ApplyCaptcha = ApplyCaptcha_V0;
|
|
|
3677
3686
|
//#region src/types/ReturnDataType/Bilibili/Captcha/ValidateCaptcha/ValidateCaptcha_V0.d.ts
|
|
3678
3687
|
type ValidateCaptcha_V0 = {
|
|
3679
3688
|
code: number;
|
|
3680
|
-
data: DataData$
|
|
3689
|
+
data: DataData$24;
|
|
3681
3690
|
message: string;
|
|
3682
3691
|
ttl: number;
|
|
3683
3692
|
[property: string]: any;
|
|
3684
3693
|
};
|
|
3685
|
-
type DataData$
|
|
3694
|
+
type DataData$24 = {
|
|
3686
3695
|
grisk_id: string;
|
|
3687
3696
|
is_valid: number;
|
|
3688
3697
|
[property: string]: any;
|
|
@@ -3694,12 +3703,12 @@ type ValidateCaptcha = ValidateCaptcha_V0;
|
|
|
3694
3703
|
//#region src/types/ReturnDataType/Bilibili/ColumnInfo/ColumnInfo_V0.d.ts
|
|
3695
3704
|
type ColumnInfo_V0 = {
|
|
3696
3705
|
code: number;
|
|
3697
|
-
data: DataData$
|
|
3706
|
+
data: DataData$23;
|
|
3698
3707
|
message: string;
|
|
3699
3708
|
ttl: number;
|
|
3700
3709
|
[property: string]: any;
|
|
3701
3710
|
};
|
|
3702
|
-
type DataData$
|
|
3711
|
+
type DataData$23 = {
|
|
3703
3712
|
articles: null;
|
|
3704
3713
|
attention: boolean;
|
|
3705
3714
|
author: Author$9;
|
|
@@ -3805,12 +3814,12 @@ type ColumnInfo = ColumnInfo_V0;
|
|
|
3805
3814
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_ARTICLE/DYNAMIC_TYPE_ARTICLE_V0.d.ts
|
|
3806
3815
|
type DynamicTypeArticle_V0 = {
|
|
3807
3816
|
code: number;
|
|
3808
|
-
data: DataData$
|
|
3817
|
+
data: DataData$22;
|
|
3809
3818
|
message: string;
|
|
3810
3819
|
ttl: number;
|
|
3811
3820
|
[property: string]: any;
|
|
3812
3821
|
};
|
|
3813
|
-
type DataData$
|
|
3822
|
+
type DataData$22 = {
|
|
3814
3823
|
item: Item$16;
|
|
3815
3824
|
[property: string]: any;
|
|
3816
3825
|
};
|
|
@@ -4069,12 +4078,12 @@ type DynamicTypeArticle = DynamicTypeArticle_V0;
|
|
|
4069
4078
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_AV/DYNAMIC_TYPE_AV_V0.d.ts
|
|
4070
4079
|
type DynamicTypeAV_V0$1 = {
|
|
4071
4080
|
code: number;
|
|
4072
|
-
data: DataData$
|
|
4081
|
+
data: DataData$21;
|
|
4073
4082
|
message: string;
|
|
4074
4083
|
ttl: number;
|
|
4075
4084
|
[property: string]: any;
|
|
4076
4085
|
};
|
|
4077
|
-
type DataData$
|
|
4086
|
+
type DataData$21 = {
|
|
4078
4087
|
item: Item$15;
|
|
4079
4088
|
[property: string]: any;
|
|
4080
4089
|
};
|
|
@@ -4350,12 +4359,12 @@ type DynamicTypeAV = DynamicTypeAV_V0$1;
|
|
|
4350
4359
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_DRAW/DYNAMIC_TYPE_DRAW_V0.d.ts
|
|
4351
4360
|
type DynamicTypeDraw_V0$1 = {
|
|
4352
4361
|
code: number;
|
|
4353
|
-
data: DataData$
|
|
4362
|
+
data: DataData$20;
|
|
4354
4363
|
message: string;
|
|
4355
4364
|
ttl: number;
|
|
4356
4365
|
[property: string]: any;
|
|
4357
4366
|
};
|
|
4358
|
-
type DataData$
|
|
4367
|
+
type DataData$20 = {
|
|
4359
4368
|
item: Item$14;
|
|
4360
4369
|
[property: string]: any;
|
|
4361
4370
|
};
|
|
@@ -4710,12 +4719,12 @@ type DynamicTypeDraw = DynamicTypeDraw_V0$1;
|
|
|
4710
4719
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_FORWARD/Forward/DYNAMIC_TYPE_AV/DYNAMIC_TYPE_AV_V0.d.ts
|
|
4711
4720
|
type DynamicTypeAV_V0 = {
|
|
4712
4721
|
code: number;
|
|
4713
|
-
data: DataData$
|
|
4722
|
+
data: DataData$19;
|
|
4714
4723
|
message: string;
|
|
4715
4724
|
ttl: number;
|
|
4716
4725
|
[property: string]: any;
|
|
4717
4726
|
};
|
|
4718
|
-
type DataData$
|
|
4727
|
+
type DataData$19 = {
|
|
4719
4728
|
item: Item$13;
|
|
4720
4729
|
[property: string]: any;
|
|
4721
4730
|
};
|
|
@@ -5245,12 +5254,12 @@ type Stat$2 = {
|
|
|
5245
5254
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_FORWARD/Forward/DYNAMIC_TYPE_AV/DYNAMIC_TYPE_AV_V1.d.ts
|
|
5246
5255
|
type DynamicTypeAV_V1 = {
|
|
5247
5256
|
code: number;
|
|
5248
|
-
data: DataData$
|
|
5257
|
+
data: DataData$18;
|
|
5249
5258
|
message: string;
|
|
5250
5259
|
ttl: number;
|
|
5251
5260
|
[property: string]: any;
|
|
5252
5261
|
};
|
|
5253
|
-
type DataData$
|
|
5262
|
+
type DataData$18 = {
|
|
5254
5263
|
item: Item$12;
|
|
5255
5264
|
[property: string]: any;
|
|
5256
5265
|
};
|
|
@@ -5752,12 +5761,12 @@ type DynamicTypeAV$1 = DynamicTypeAV_V0 | DynamicTypeAV_V1;
|
|
|
5752
5761
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_FORWARD/Forward/DYNAMIC_TYPE_DRAW/DYNAMIC_TYPE_DRAW_V0.d.ts
|
|
5753
5762
|
type DynamicTypeDraw_V0 = {
|
|
5754
5763
|
code: number;
|
|
5755
|
-
data: DataData$
|
|
5764
|
+
data: DataData$17;
|
|
5756
5765
|
message: string;
|
|
5757
5766
|
ttl: number;
|
|
5758
5767
|
[property: string]: any;
|
|
5759
5768
|
};
|
|
5760
|
-
type DataData$
|
|
5769
|
+
type DataData$17 = {
|
|
5761
5770
|
item: Item$11;
|
|
5762
5771
|
[property: string]: any;
|
|
5763
5772
|
};
|
|
@@ -6290,12 +6299,12 @@ type SummaryRichTextNode$2 = {
|
|
|
6290
6299
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_FORWARD/Forward/DYNAMIC_TYPE_DRAW/DYNAMIC_TYPE_DRAW_V1.d.ts
|
|
6291
6300
|
type DynamicTypeDraw_V1 = {
|
|
6292
6301
|
code: number;
|
|
6293
|
-
data: DataData$
|
|
6302
|
+
data: DataData$16;
|
|
6294
6303
|
message: string;
|
|
6295
6304
|
ttl: number;
|
|
6296
6305
|
[property: string]: any;
|
|
6297
6306
|
};
|
|
6298
|
-
type DataData$
|
|
6307
|
+
type DataData$16 = {
|
|
6299
6308
|
item: Item$10;
|
|
6300
6309
|
[property: string]: any;
|
|
6301
6310
|
};
|
|
@@ -6831,12 +6840,12 @@ type DynamicTypeDraw$1 = DynamicTypeDraw_V0 | DynamicTypeDraw_V1;
|
|
|
6831
6840
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_FORWARD/Forward/DYNAMIC_TYPE_LIVE_RCMD/DYNAMIC_TYPE_LIVE_RCMD_V0.d.ts
|
|
6832
6841
|
type DynamicTypeLiveRcmd_V0$1 = {
|
|
6833
6842
|
code: number;
|
|
6834
|
-
data: DataData$
|
|
6843
|
+
data: DataData$15;
|
|
6835
6844
|
message: string;
|
|
6836
6845
|
ttl: number;
|
|
6837
6846
|
[property: string]: any;
|
|
6838
6847
|
};
|
|
6839
|
-
type DataData$
|
|
6848
|
+
type DataData$15 = {
|
|
6840
6849
|
item: Item$9;
|
|
6841
6850
|
[property: string]: any;
|
|
6842
6851
|
};
|
|
@@ -7315,12 +7324,12 @@ type DynamicTypeLiveRcmd$1 = DynamicTypeLiveRcmd_V0$1;
|
|
|
7315
7324
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_FORWARD/Forward/DYNAMIC_TYPE_WORD/DYNAMIC_TYPE_WORD_V0.d.ts
|
|
7316
7325
|
type DynamicTypeWord_V0$1 = {
|
|
7317
7326
|
code: number;
|
|
7318
|
-
data: DataData$
|
|
7327
|
+
data: DataData$14;
|
|
7319
7328
|
message: string;
|
|
7320
7329
|
ttl: number;
|
|
7321
7330
|
[property: string]: any;
|
|
7322
7331
|
};
|
|
7323
|
-
type DataData$
|
|
7332
|
+
type DataData$14 = {
|
|
7324
7333
|
item: Item$8;
|
|
7325
7334
|
[property: string]: any;
|
|
7326
7335
|
};
|
|
@@ -7913,7 +7922,7 @@ type OriginalDynamicItemMap = {
|
|
|
7913
7922
|
};
|
|
7914
7923
|
type ItemBasic = DynamicTypeWord$1['data']['item']['basic'] | DynamicTypeLiveRcmd$1['data']['item']['basic'] | DynamicTypeDraw$1['data']['item']['basic'] | DynamicTypeAV$1['data']['item']['basic'];
|
|
7915
7924
|
type ItemModules = DynamicTypeWord$1['data']['item']['modules'] | DynamicTypeLiveRcmd$1['data']['item']['modules'] | DynamicTypeDraw$1['data']['item']['modules'] | DynamicTypeAV$1['data']['item']['modules'];
|
|
7916
|
-
type DataData$
|
|
7925
|
+
type DataData$13<T extends keyof OriginalDynamicItemMap> = {
|
|
7917
7926
|
item: {
|
|
7918
7927
|
basic: ItemBasic;
|
|
7919
7928
|
id_str: string;
|
|
@@ -7927,7 +7936,7 @@ type DataData$12<T extends keyof OriginalDynamicItemMap> = {
|
|
|
7927
7936
|
};
|
|
7928
7937
|
type DynamicTypeForward<T extends keyof OriginalDynamicItemMap> = {
|
|
7929
7938
|
code: number;
|
|
7930
|
-
data: DataData$
|
|
7939
|
+
data: DataData$13<T>;
|
|
7931
7940
|
message: string;
|
|
7932
7941
|
ttl: number;
|
|
7933
7942
|
[property: string]: any;
|
|
@@ -7937,12 +7946,12 @@ type DynamicTypeForwardUnion = DynamicTypeForward<DynamicType.AV> | DynamicTypeF
|
|
|
7937
7946
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_LIVE_RCMD/DYNAMIC_TYPE_LIVE_RCMD_V0.d.ts
|
|
7938
7947
|
type DynamicTypeLiveRcmd_V0 = {
|
|
7939
7948
|
code: number;
|
|
7940
|
-
data: DataData$
|
|
7949
|
+
data: DataData$12;
|
|
7941
7950
|
message: string;
|
|
7942
7951
|
ttl: number;
|
|
7943
7952
|
[property: string]: any;
|
|
7944
7953
|
};
|
|
7945
|
-
type DataData$
|
|
7954
|
+
type DataData$12 = {
|
|
7946
7955
|
item: Item$7;
|
|
7947
7956
|
[property: string]: any;
|
|
7948
7957
|
};
|
|
@@ -8217,12 +8226,12 @@ type DynamicTypeLiveRcmd = DynamicTypeLiveRcmd_V0;
|
|
|
8217
8226
|
//#region src/types/ReturnDataType/Bilibili/Dynamic/DYNAMIC_TYPE_WORD/DYNAMIC_TYPE_WORD_V0.d.ts
|
|
8218
8227
|
type DynamicTypeWord_V0 = {
|
|
8219
8228
|
code: number;
|
|
8220
|
-
data: DataData$
|
|
8229
|
+
data: DataData$11;
|
|
8221
8230
|
message: string;
|
|
8222
8231
|
ttl: number;
|
|
8223
8232
|
[property: string]: any;
|
|
8224
8233
|
};
|
|
8225
|
-
type DataData$
|
|
8234
|
+
type DataData$11 = {
|
|
8226
8235
|
item: Item$6;
|
|
8227
8236
|
[property: string]: any;
|
|
8228
8237
|
};
|
|
@@ -8630,12 +8639,12 @@ type DynamicTypeItemMap$1 = {
|
|
|
8630
8639
|
[DynamicType.FORWARD]: DynamicTypeForwardUnion['data']['item'];
|
|
8631
8640
|
[DynamicType.ARTICLE]: DynamicTypeArticle['data']['item'];
|
|
8632
8641
|
};
|
|
8633
|
-
type DataData$
|
|
8642
|
+
type DataData$10<T extends DynamicType> = {
|
|
8634
8643
|
item: DynamicTypeItemMap$1[T];
|
|
8635
8644
|
};
|
|
8636
8645
|
type BiliDynamicInfo<T extends DynamicType> = {
|
|
8637
8646
|
code: number;
|
|
8638
|
-
data: DataData$
|
|
8647
|
+
data: DataData$10<T>;
|
|
8639
8648
|
message: string;
|
|
8640
8649
|
ttl: number;
|
|
8641
8650
|
[property: string]: any;
|
|
@@ -8959,7 +8968,7 @@ type BiliOneWork = BiliOneWork_V0;
|
|
|
8959
8968
|
//#region src/types/ReturnDataType/Bilibili/UserDynamic/index.d.ts
|
|
8960
8969
|
type BiliUserDynamic = {
|
|
8961
8970
|
code: number;
|
|
8962
|
-
data: DataData$
|
|
8971
|
+
data: DataData$9;
|
|
8963
8972
|
message: string;
|
|
8964
8973
|
ttl: number;
|
|
8965
8974
|
[property: string]: any;
|
|
@@ -8978,7 +8987,7 @@ type DynamicTypeItemMap = {
|
|
|
8978
8987
|
[DynamicType.FORWARD]: ForwardItem;
|
|
8979
8988
|
[DynamicType.ARTICLE]: ArticleItem;
|
|
8980
8989
|
};
|
|
8981
|
-
type DataData$
|
|
8990
|
+
type DataData$9<T extends DynamicType = DynamicType> = {
|
|
8982
8991
|
has_more: boolean;
|
|
8983
8992
|
items: DynamicTypeItemMap[T][];
|
|
8984
8993
|
offset: string;
|
|
@@ -9015,6 +9024,32 @@ type Article = {
|
|
|
9015
9024
|
//#region src/types/ReturnDataType/Bilibili/UserFullView/index.d.ts
|
|
9016
9025
|
type BiliUserFullView = BiliUserFullView_V0;
|
|
9017
9026
|
//#endregion
|
|
9027
|
+
//#region src/types/ReturnDataType/Bilibili/UserLiveStatus/UserLiveStatus_V0.d.ts
|
|
9028
|
+
type BiliUserLiveStatus_V0 = {
|
|
9029
|
+
code: number;
|
|
9030
|
+
data: DataData$8;
|
|
9031
|
+
message: string;
|
|
9032
|
+
ttl: number;
|
|
9033
|
+
[property: string]: any;
|
|
9034
|
+
};
|
|
9035
|
+
type DataData$8 = {
|
|
9036
|
+
broadcast_type: number;
|
|
9037
|
+
cover: string;
|
|
9038
|
+
link: string;
|
|
9039
|
+
liveStatus: number;
|
|
9040
|
+
online: number;
|
|
9041
|
+
online_hidden: number;
|
|
9042
|
+
roomid: number;
|
|
9043
|
+
roomStatus: number;
|
|
9044
|
+
roundStatus: number;
|
|
9045
|
+
title: string;
|
|
9046
|
+
url: string;
|
|
9047
|
+
[property: string]: any;
|
|
9048
|
+
};
|
|
9049
|
+
//#endregion
|
|
9050
|
+
//#region src/types/ReturnDataType/Bilibili/UserLiveStatus/index.d.ts
|
|
9051
|
+
type BiliUserLiveStatus = BiliUserLiveStatus_V0;
|
|
9052
|
+
//#endregion
|
|
9018
9053
|
//#region src/types/ReturnDataType/Bilibili/UserProfile/UserProfile_V0.d.ts
|
|
9019
9054
|
type BiliUserProfile_V0 = {
|
|
9020
9055
|
code: number;
|
|
@@ -11502,6 +11537,7 @@ interface BilibiliReturnTypeMap {
|
|
|
11502
11537
|
commentReplies: BiliCommentReply;
|
|
11503
11538
|
userCard: BiliUserProfile;
|
|
11504
11539
|
userDynamicList: BiliUserDynamic;
|
|
11540
|
+
userLiveStatus: BiliUserLiveStatus;
|
|
11505
11541
|
userSpaceInfo: UserSpaceInfo;
|
|
11506
11542
|
emojiList: BiliEmojiList;
|
|
11507
11543
|
bangumiInfo: BiliBangumiVideoInfo;
|
|
@@ -26031,6 +26067,7 @@ declare const BilibiliInternalMethods: {
|
|
|
26031
26067
|
readonly COMMENT_REPLIES: "指定评论的回复";
|
|
26032
26068
|
readonly USER_CARD: "用户主页数据";
|
|
26033
26069
|
readonly USER_DYNAMICS: "用户主页动态列表数据";
|
|
26070
|
+
readonly USER_LIVE_STATUS: "用户直播状态";
|
|
26034
26071
|
readonly USER_SPACE_INFO: "用户空间详细信息";
|
|
26035
26072
|
readonly USER_TOTAL_VIEWS: "获取UP主总播放量";
|
|
26036
26073
|
readonly DYNAMIC_DETAIL: "动态详情数据";
|
|
@@ -26061,6 +26098,7 @@ declare const BilibiliFetcherMethods: {
|
|
|
26061
26098
|
readonly COMMENT_REPLIES: "fetchCommentReplies";
|
|
26062
26099
|
readonly USER_CARD: "fetchUserCard";
|
|
26063
26100
|
readonly USER_DYNAMICS: "fetchUserDynamicList";
|
|
26101
|
+
readonly USER_LIVE_STATUS: "fetchUserLiveStatus";
|
|
26064
26102
|
readonly USER_SPACE_INFO: "fetchUserSpaceInfo";
|
|
26065
26103
|
readonly USER_TOTAL_VIEWS: "fetchUploaderTotalViews";
|
|
26066
26104
|
readonly DYNAMIC_DETAIL: "fetchDynamicDetail";
|
|
@@ -26196,6 +26234,7 @@ declare const MethodMaps: {
|
|
|
26196
26234
|
readonly COMMENT_REPLIES: "指定评论的回复";
|
|
26197
26235
|
readonly USER_CARD: "用户主页数据";
|
|
26198
26236
|
readonly USER_DYNAMICS: "用户主页动态列表数据";
|
|
26237
|
+
readonly USER_LIVE_STATUS: "用户直播状态";
|
|
26199
26238
|
readonly USER_SPACE_INFO: "用户空间详细信息";
|
|
26200
26239
|
readonly USER_TOTAL_VIEWS: "获取UP主总播放量";
|
|
26201
26240
|
readonly DYNAMIC_DETAIL: "动态详情数据";
|
|
@@ -26225,6 +26264,7 @@ declare const MethodMaps: {
|
|
|
26225
26264
|
readonly COMMENT_REPLIES: "fetchCommentReplies";
|
|
26226
26265
|
readonly USER_CARD: "fetchUserCard";
|
|
26227
26266
|
readonly USER_DYNAMICS: "fetchUserDynamicList";
|
|
26267
|
+
readonly USER_LIVE_STATUS: "fetchUserLiveStatus";
|
|
26228
26268
|
readonly USER_SPACE_INFO: "fetchUserSpaceInfo";
|
|
26229
26269
|
readonly USER_TOTAL_VIEWS: "fetchUploaderTotalViews";
|
|
26230
26270
|
readonly DYNAMIC_DETAIL: "fetchDynamicDetail";
|
|
@@ -26426,6 +26466,13 @@ declare class BilibiliAPI {
|
|
|
26426
26466
|
getDynamicCard(data: BilibiliMethodOptionsWithoutMethodType['DynamicParams']): string;
|
|
26427
26467
|
/** 获取用户名片信息 */
|
|
26428
26468
|
getUserCard(data: BilibiliMethodOptionsWithoutMethodType['UserParams']): string;
|
|
26469
|
+
/**
|
|
26470
|
+
* 按用户 UID 获取直播状态。
|
|
26471
|
+
*
|
|
26472
|
+
* @remarks
|
|
26473
|
+
* 该接口直接返回用户当前直播状态,不依赖空间动态中的直播推荐卡片。
|
|
26474
|
+
*/
|
|
26475
|
+
getUserLiveStatus(data: BilibiliMethodOptionsWithoutMethodType['UserParams']): string;
|
|
26429
26476
|
/** 获取直播间信息 */
|
|
26430
26477
|
getLiveRoomInfo(data: BilibiliMethodOptionsWithoutMethodType['LiveRoomParams']): string;
|
|
26431
26478
|
/** 获取直播间初始化信息 */
|
|
@@ -26625,6 +26672,10 @@ interface IBilibiliFetcher {
|
|
|
26625
26672
|
* 获取B站用户动态列表
|
|
26626
26673
|
*/
|
|
26627
26674
|
fetchUserDynamicList: MethodOverload<BilibiliUserOptions, BilibiliReturnTypeMap['userDynamicList']>;
|
|
26675
|
+
/**
|
|
26676
|
+
* 按用户 UID 获取B站直播状态
|
|
26677
|
+
*/
|
|
26678
|
+
fetchUserLiveStatus: MethodOverload<BilibiliUserOptions, BilibiliReturnTypeMap['userLiveStatus']>;
|
|
26628
26679
|
/**
|
|
26629
26680
|
* 获取B站用户空间详细信息
|
|
26630
26681
|
*/
|
|
@@ -27163,6 +27214,8 @@ interface IBoundBilibiliFetcher {
|
|
|
27163
27214
|
fetchUserCard: BoundMethodOverload<BilibiliUserOptions, BilibiliReturnTypeMap['userCard']>;
|
|
27164
27215
|
/** 获取B站用户动态列表 */
|
|
27165
27216
|
fetchUserDynamicList: BoundMethodOverload<BilibiliUserOptions, BilibiliReturnTypeMap['userDynamicList']>;
|
|
27217
|
+
/** 按用户 UID 获取B站直播状态 */
|
|
27218
|
+
fetchUserLiveStatus: BoundMethodOverload<BilibiliUserOptions, BilibiliReturnTypeMap['userLiveStatus']>;
|
|
27166
27219
|
/** 获取B站用户空间详细信息 */
|
|
27167
27220
|
fetchUserSpaceInfo: BoundMethodOverload<BilibiliUserOptions, BilibiliReturnTypeMap['userSpaceInfo']>;
|
|
27168
27221
|
/** 获取B站 UP 主总播放量 */
|
|
@@ -28930,6 +28983,7 @@ declare const BilibiliMethodMapping: {
|
|
|
28930
28983
|
readonly 指定评论的回复: "fetchCommentReplies";
|
|
28931
28984
|
readonly 用户主页数据: "fetchUserCard";
|
|
28932
28985
|
readonly 用户主页动态列表数据: "fetchUserDynamicList";
|
|
28986
|
+
readonly 用户直播状态: "fetchUserLiveStatus";
|
|
28933
28987
|
readonly 用户空间详细信息: "fetchUserSpaceInfo";
|
|
28934
28988
|
readonly 获取UP主总播放量: "fetchUploaderTotalViews";
|
|
28935
28989
|
readonly 动态详情数据: "fetchDynamicDetail";
|
|
@@ -29015,6 +29069,7 @@ declare const BilibiliApiRoutes: {
|
|
|
29015
29069
|
readonly commentReplies: "/comment-replies";
|
|
29016
29070
|
readonly userCard: "/user";
|
|
29017
29071
|
readonly userDynamicList: "/user/dynamics";
|
|
29072
|
+
readonly userLiveStatus: "/user/live-status";
|
|
29018
29073
|
readonly userSpaceInfo: "/user/space";
|
|
29019
29074
|
readonly uploaderTotalViews: "/user/total-views";
|
|
29020
29075
|
readonly dynamicDetail: "/dynamic";
|
|
@@ -29135,5 +29190,5 @@ declare const amagi: typeof Client;
|
|
|
29135
29190
|
* GPL-3.0 Licensed
|
|
29136
29191
|
*/
|
|
29137
29192
|
//#endregion
|
|
29138
|
-
export { APIErrorType, AdditionalType, AmagiEventMap, AmagiEventType, type ApiEndpoint, ApiError, ApiErrorEventData, ApiResponse, ApiSuccessEventData, ArticleCard, ArticleContent, ArticleInfo, ArticleWork, BaseRequestOptions, BaseResponse, BiliAv2Bv, BiliBangumiVideoInfo, BiliBangumiVideoPlayurlIsLogin, BiliBangumiVideoPlayurlNoLogin, BiliBiliVideoPlayurlNoLogin, BiliBv2AV, BiliCheckQrcode, BiliCommentReply, BiliDynamicCard, BiliDynamicInfo, BiliDynamicInfoUnion, BiliEmojiList, BiliLiveRoomDef, BiliLiveRoomDetail, BiliNewLoginQrcode, BiliOneWork, BiliProtobufDanmaku, BiliUserDynamic, BiliUserFullView, BiliUserProfile, BiliVideoPlayurlIsLogin, BiliWorkComments, BilibiliApiRoutes, type BilibiliApplyCaptchaOptions, BilibiliApplyCaptchaParamsSchema, type BilibiliArticleCardOptions, BilibiliArticleCardParamsSchema, BilibiliArticleInfoParamsSchema, type BilibiliArticleOptions, BilibiliArticleParamsSchema, type BilibiliAv2BvOptions, BilibiliAv2BvParamsSchema, type BilibiliBangumiInfoOptions, BilibiliBangumiInfoParamsSchema, type BilibiliBangumiStreamOptions, BilibiliBangumiStreamParamsSchema, type BilibiliBv2AvOptions, BilibiliBv2AvParamsSchema, BilibiliColumnInfoParamsSchema, BilibiliCommentParamsSchema, type BilibiliCommentRepliesOptions, BilibiliCommentReplyParamsSchema, type BilibiliCommentsOptions, type BilibiliDanmakuOptions, BilibiliDanmakuParamsSchema, BilibiliDataOptions, BilibiliDataOptionsMap, type BilibiliDynamicOptions, BilibiliDynamicParamsSchema, BilibiliEmojiParamsSchema, type BilibiliFetcher, BilibiliFetcherMethodKey, BilibiliFetcherMethods, BilibiliInternalMethodKey, BilibiliInternalMethods, BilibiliLiveParamsSchema, type BilibiliLiveRoomOptions, BilibiliLoginParamsSchema, type BilibiliMethodKey, BilibiliMethodMapping, BilibiliMethodOptMap, BilibiliMethodOptionsMap, BilibiliMethodRoutes, BilibiliMethodToFetcher, BilibiliMethodType, type BilibiliMethodValue, BilibiliQrcodeParamsSchema, type BilibiliQrcodeStatusOptions, BilibiliQrcodeStatusParamsSchema, BilibiliReturnTypeMap, type BilibiliUserOptions, BilibiliUserParamsSchema, type BilibiliValidateCaptchaOptions, BilibiliValidateCaptchaParamsSchema, BilibiliValidationSchemas, BilibiliVideoDownloadParamsSchema, type BilibiliVideoInfoOptions, BilibiliVideoParamsSchema, type BilibiliVideoStreamOptions, BoundBilibiliApi, type BoundBilibiliFetcher, BoundDouyinApi, type BoundDouyinFetcher, BoundKuaishouApi, type BoundKuaishouFetcher, BoundXiaohongshuApi, type BoundXiaohongshuFetcher, ColumnInfo, CommentReply, CommentType, ConditionalReturnType, CookieConfig, CreateApp, DouyinApiRoutes, DouyinCommentParamsSchema, type DouyinCommentRepliesOptions, DouyinCommentReplyParamsSchema, type DouyinCommentsOptions, type DouyinDanmakuOptions, DouyinDanmakuParamsSchema, DouyinDataOptions, DouyinDataOptionsMap, DouyinEmojiListParamsSchema, DouyinEmojiProParamsSchema, type DouyinFetcher, DouyinFetcherMethodKey, DouyinFetcherMethods, DouyinHotWordsParamsSchema, DouyinInternalMethodKey, DouyinInternalMethods, type DouyinLiveRoomOptions, DouyinLiveRoomParamsSchema, type DouyinMethodKey, DouyinMethodMapping, DouyinMethodOptMap, DouyinMethodOptionsMap, DouyinMethodRoutes, DouyinMethodToFetcher, DouyinMethodType, type DouyinMethodValue, type DouyinMusicOptions, DouyinMusicParamsSchema, type DouyinQrcodeOptions, DouyinQrcodeParamsSchema, DouyinReturnTypeMap, type DouyinSearchOptions, DouyinSearchParamsSchema, type DouyinSuggestWordsOptions, type DouyinUserListOptions, DouyinUserListParamsSchema, type DouyinUserOptions, DouyinUserParamsSchema, DouyinValidationSchemas, type DouyinWorkOptions, DouyinWorkParamsSchema, DyDanmakuList, DyEmojiList, DyEmojiProList, DyImageAlbumWork, DyMusicWork, DySearchInfo, DySlidesWork, DySuggestWords, DyUserInfo, DyUserLiveVideos, DyUserPostVideos, DyVideoWork, DyWorkComments, DynamicType, DynamicTypeAV, DynamicTypeArticle, DynamicTypeDraw, DynamicTypeForward, DynamicTypeForwardUnion, DynamicTypeLiveRcmd, DynamicTypeWord, ErrorResult, ExtractTypeMode, FetcherConfig, HomeFeed, type HttpMethod, HttpRequestEventData, HttpResponseEventData, type IBilibiliFetcher, type IBoundBilibiliFetcher, type IBoundDouyinFetcher, type IBoundKuaishouFetcher, type IBoundXiaohongshuFetcher, type IDouyinFetcher, type IKuaishouFetcher, type IXiaohongshuFetcher, type KsBannedStatus, KsEmojiList, KsLiveRoomInfo, KsOneWork, type KsUserHomeWork, KsUserProfile, type KsUserProfileCounts, type KsUserProfileGameInfo, type KsUserProfileLiveInfo, type KsUserProfileSensitiveInfo, type KsUserProfileUserInfo, KsUserWorkList, type KsVerifiedStatus, KsWorkComments, KuaishouApiRoutes, KuaishouCommentParamsSchema, type KuaishouCommentsOptions, KuaishouDataOptions, KuaishouDataOptionsMap, KuaishouEmojiParamsSchema, type KuaishouFetcher, KuaishouFetcherMethodKey, KuaishouFetcherMethods, type KuaishouGraphqlRequest, KuaishouInternalMethodKey, KuaishouInternalMethods, type KuaishouLiveApiRequest, type KuaishouLiveRoomInfoOptions, KuaishouLiveRoomInfoParamsSchema, type KuaishouMethodKey, KuaishouMethodMapping, KuaishouMethodOptMap, KuaishouMethodOptionsMap, KuaishouMethodRoutes, KuaishouMethodToFetcher, KuaishouMethodType, type KuaishouMethodValue, KuaishouReturnTypeMap, type KuaishouUserProfileOptions, KuaishouUserProfileParamsSchema, type KuaishouUserWorkListOptions, KuaishouUserWorkListParamsSchema, KuaishouValidationSchemas, KuaishouVideoParamsSchema, type KuaishouVideoWorkOptions, LogEventData, MajorType, MethodMaps, NetworkErrorEventData, NetworkRetryEventData, type NetworksConfigType, NoteComments, OmitMethodType, OneNote, Options, type Platform, RequestConfig, Result, SearchInfoGeneralData, SearchInfoUser, SearchInfoVideo, SearchNotes, SuccessResult, TypeControl, TypeMode, ValidationError, XiaohongshuApiRoutes, type XiaohongshuCommentsOptions, XiaohongshuDataOptions, XiaohongshuDataOptionsMap, XiaohongshuEmojiList, type XiaohongshuFetcher, XiaohongshuFetcherMethodKey, XiaohongshuFetcherMethods, type XiaohongshuHomeFeedOptions, XiaohongshuInternalMethodKey, XiaohongshuInternalMethods, type XiaohongshuMethodKey, XiaohongshuMethodMapping, XiaohongshuMethodOptMap, XiaohongshuMethodOptionsMap, XiaohongshuMethodRoutes, XiaohongshuMethodToFetcher, XiaohongshuMethodType, type XiaohongshuMethodValue, type XiaohongshuNoteDetailOptions, XiaohongshuReturnTypeMap, type XiaohongshuSearchNotesOptions, type XiaohongshuUserNotesOptions, XiaohongshuUserProfile, type XiaohongshuUserProfileOptions, XiaohongshuValidationSchemas, amagi, amagiClient, amagiEvents, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliFetcher, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBilibiliRoutes as registerBilibiliRoutes, createBoundBilibiliApi, createBoundBilibiliFetcher, createBoundDouyinApi, createBoundDouyinFetcher, createBoundKuaishouApi, createBoundKuaishouFetcher, createBoundXiaohongshuApi, createBoundXiaohongshuFetcher, createDouyinRoutes, createDouyinRoutes as registerDouyinRoutes, createErrorResponse, createKuaishouRoutes, createKuaishouRoutes as registerKuaishouRoutes, createSuccessResponse, createXiaohongshuRoutes, createXiaohongshuRoutes as registerXiaohongshuRoutes, Client as default, douyin, douyinApiUrls, douyinFetcher, douyinSign, douyinUtils, emitApiError, emitApiSuccess, emitHttpRequest, emitHttpResponse, emitLog, emitLogDebug, emitLogError, emitLogInfo, emitLogMark, emitLogWarn, emitNetworkError, emitNetworkRetry, fetchData, fetchResponse, getApiRoute, getBilibiliData, getDouyinData, getEnglishMethodName, getHeadersAndData, getKuaishouData, handleError, httpLogger, initLogger, isNetworkErrorResult, kuaishou, kuaishouApiUrls, kuaishouFetcher, kuaishouSign, kuaishouUtils, logMiddleware, logger, parseDmSegMobileReply, qtparam, toFetcherMethod, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, validateXiaohongshuParams, wbi_sign, xiaohongshu, xiaohongshuApiUrls, xiaohongshuFetcher, xiaohongshuSign, xiaohongshuUtils };
|
|
29193
|
+
export { APIErrorType, AdditionalType, AmagiEventMap, AmagiEventType, type ApiEndpoint, ApiError, ApiErrorEventData, ApiResponse, ApiSuccessEventData, ArticleCard, ArticleContent, ArticleInfo, ArticleWork, BaseRequestOptions, BaseResponse, BiliAv2Bv, BiliBangumiVideoInfo, BiliBangumiVideoPlayurlIsLogin, BiliBangumiVideoPlayurlNoLogin, BiliBiliVideoPlayurlNoLogin, BiliBv2AV, BiliCheckQrcode, BiliCommentReply, BiliDynamicCard, BiliDynamicInfo, BiliDynamicInfoUnion, BiliEmojiList, BiliLiveRoomDef, BiliLiveRoomDetail, BiliNewLoginQrcode, BiliOneWork, BiliProtobufDanmaku, BiliUserDynamic, BiliUserFullView, BiliUserLiveStatus, BiliUserProfile, BiliVideoPlayurlIsLogin, BiliWorkComments, BilibiliApiRoutes, type BilibiliApplyCaptchaOptions, BilibiliApplyCaptchaParamsSchema, type BilibiliArticleCardOptions, BilibiliArticleCardParamsSchema, BilibiliArticleInfoParamsSchema, type BilibiliArticleOptions, BilibiliArticleParamsSchema, type BilibiliAv2BvOptions, BilibiliAv2BvParamsSchema, type BilibiliBangumiInfoOptions, BilibiliBangumiInfoParamsSchema, type BilibiliBangumiStreamOptions, BilibiliBangumiStreamParamsSchema, type BilibiliBv2AvOptions, BilibiliBv2AvParamsSchema, BilibiliColumnInfoParamsSchema, BilibiliCommentParamsSchema, type BilibiliCommentRepliesOptions, BilibiliCommentReplyParamsSchema, type BilibiliCommentsOptions, type BilibiliDanmakuOptions, BilibiliDanmakuParamsSchema, BilibiliDataOptions, BilibiliDataOptionsMap, type BilibiliDynamicOptions, BilibiliDynamicParamsSchema, BilibiliEmojiParamsSchema, type BilibiliFetcher, BilibiliFetcherMethodKey, BilibiliFetcherMethods, BilibiliInternalMethodKey, BilibiliInternalMethods, BilibiliLiveParamsSchema, type BilibiliLiveRoomOptions, BilibiliLoginParamsSchema, type BilibiliMethodKey, BilibiliMethodMapping, BilibiliMethodOptMap, BilibiliMethodOptionsMap, BilibiliMethodRoutes, BilibiliMethodToFetcher, BilibiliMethodType, type BilibiliMethodValue, BilibiliQrcodeParamsSchema, type BilibiliQrcodeStatusOptions, BilibiliQrcodeStatusParamsSchema, BilibiliReturnTypeMap, type BilibiliUserOptions, BilibiliUserParamsSchema, type BilibiliValidateCaptchaOptions, BilibiliValidateCaptchaParamsSchema, BilibiliValidationSchemas, BilibiliVideoDownloadParamsSchema, type BilibiliVideoInfoOptions, BilibiliVideoParamsSchema, type BilibiliVideoStreamOptions, BoundBilibiliApi, type BoundBilibiliFetcher, BoundDouyinApi, type BoundDouyinFetcher, BoundKuaishouApi, type BoundKuaishouFetcher, BoundXiaohongshuApi, type BoundXiaohongshuFetcher, ColumnInfo, CommentReply, CommentType, ConditionalReturnType, CookieConfig, CreateApp, DouyinApiRoutes, DouyinCommentParamsSchema, type DouyinCommentRepliesOptions, DouyinCommentReplyParamsSchema, type DouyinCommentsOptions, type DouyinDanmakuOptions, DouyinDanmakuParamsSchema, DouyinDataOptions, DouyinDataOptionsMap, DouyinEmojiListParamsSchema, DouyinEmojiProParamsSchema, type DouyinFetcher, DouyinFetcherMethodKey, DouyinFetcherMethods, DouyinHotWordsParamsSchema, DouyinInternalMethodKey, DouyinInternalMethods, type DouyinLiveRoomOptions, DouyinLiveRoomParamsSchema, type DouyinMethodKey, DouyinMethodMapping, DouyinMethodOptMap, DouyinMethodOptionsMap, DouyinMethodRoutes, DouyinMethodToFetcher, DouyinMethodType, type DouyinMethodValue, type DouyinMusicOptions, DouyinMusicParamsSchema, type DouyinQrcodeOptions, DouyinQrcodeParamsSchema, DouyinReturnTypeMap, type DouyinSearchOptions, DouyinSearchParamsSchema, type DouyinSuggestWordsOptions, type DouyinUserListOptions, DouyinUserListParamsSchema, type DouyinUserOptions, DouyinUserParamsSchema, DouyinValidationSchemas, type DouyinWorkOptions, DouyinWorkParamsSchema, DyDanmakuList, DyEmojiList, DyEmojiProList, DyImageAlbumWork, DyMusicWork, DySearchInfo, DySlidesWork, DySuggestWords, DyUserInfo, DyUserLiveVideos, DyUserPostVideos, DyVideoWork, DyWorkComments, DynamicType, DynamicTypeAV, DynamicTypeArticle, DynamicTypeDraw, DynamicTypeForward, DynamicTypeForwardUnion, DynamicTypeLiveRcmd, DynamicTypeWord, ErrorResult, ExtractTypeMode, FetcherConfig, HomeFeed, type HttpMethod, HttpRequestEventData, HttpResponseEventData, type IBilibiliFetcher, type IBoundBilibiliFetcher, type IBoundDouyinFetcher, type IBoundKuaishouFetcher, type IBoundXiaohongshuFetcher, type IDouyinFetcher, type IKuaishouFetcher, type IXiaohongshuFetcher, type KsBannedStatus, KsEmojiList, KsLiveRoomInfo, KsOneWork, type KsUserHomeWork, KsUserProfile, type KsUserProfileCounts, type KsUserProfileGameInfo, type KsUserProfileLiveInfo, type KsUserProfileSensitiveInfo, type KsUserProfileUserInfo, KsUserWorkList, type KsVerifiedStatus, KsWorkComments, KuaishouApiRoutes, KuaishouCommentParamsSchema, type KuaishouCommentsOptions, KuaishouDataOptions, KuaishouDataOptionsMap, KuaishouEmojiParamsSchema, type KuaishouFetcher, KuaishouFetcherMethodKey, KuaishouFetcherMethods, type KuaishouGraphqlRequest, KuaishouInternalMethodKey, KuaishouInternalMethods, type KuaishouLiveApiRequest, type KuaishouLiveRoomInfoOptions, KuaishouLiveRoomInfoParamsSchema, type KuaishouMethodKey, KuaishouMethodMapping, KuaishouMethodOptMap, KuaishouMethodOptionsMap, KuaishouMethodRoutes, KuaishouMethodToFetcher, KuaishouMethodType, type KuaishouMethodValue, KuaishouReturnTypeMap, type KuaishouUserProfileOptions, KuaishouUserProfileParamsSchema, type KuaishouUserWorkListOptions, KuaishouUserWorkListParamsSchema, KuaishouValidationSchemas, KuaishouVideoParamsSchema, type KuaishouVideoWorkOptions, LogEventData, MajorType, MethodMaps, NetworkErrorEventData, NetworkRetryEventData, type NetworksConfigType, NoteComments, OmitMethodType, OneNote, Options, type Platform, RequestConfig, Result, SearchInfoGeneralData, SearchInfoUser, SearchInfoVideo, SearchNotes, SuccessResult, TypeControl, TypeMode, ValidationError, XiaohongshuApiRoutes, type XiaohongshuCommentsOptions, XiaohongshuDataOptions, XiaohongshuDataOptionsMap, XiaohongshuEmojiList, type XiaohongshuFetcher, XiaohongshuFetcherMethodKey, XiaohongshuFetcherMethods, type XiaohongshuHomeFeedOptions, XiaohongshuInternalMethodKey, XiaohongshuInternalMethods, type XiaohongshuMethodKey, XiaohongshuMethodMapping, XiaohongshuMethodOptMap, XiaohongshuMethodOptionsMap, XiaohongshuMethodRoutes, XiaohongshuMethodToFetcher, XiaohongshuMethodType, type XiaohongshuMethodValue, type XiaohongshuNoteDetailOptions, XiaohongshuReturnTypeMap, type XiaohongshuSearchNotesOptions, type XiaohongshuUserNotesOptions, XiaohongshuUserProfile, type XiaohongshuUserProfileOptions, XiaohongshuValidationSchemas, amagi, amagiClient, amagiEvents, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliFetcher, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBilibiliRoutes as registerBilibiliRoutes, createBoundBilibiliApi, createBoundBilibiliFetcher, createBoundDouyinApi, createBoundDouyinFetcher, createBoundKuaishouApi, createBoundKuaishouFetcher, createBoundXiaohongshuApi, createBoundXiaohongshuFetcher, createDouyinRoutes, createDouyinRoutes as registerDouyinRoutes, createErrorResponse, createKuaishouRoutes, createKuaishouRoutes as registerKuaishouRoutes, createSuccessResponse, createXiaohongshuRoutes, createXiaohongshuRoutes as registerXiaohongshuRoutes, Client as default, douyin, douyinApiUrls, douyinFetcher, douyinSign, douyinUtils, emitApiError, emitApiSuccess, emitHttpRequest, emitHttpResponse, emitLog, emitLogDebug, emitLogError, emitLogInfo, emitLogMark, emitLogWarn, emitNetworkError, emitNetworkRetry, fetchData, fetchResponse, getApiRoute, getBilibiliData, getDouyinData, getEnglishMethodName, getHeadersAndData, getKuaishouData, handleError, httpLogger, initLogger, isNetworkErrorResult, kuaishou, kuaishouApiUrls, kuaishouFetcher, kuaishouSign, kuaishouUtils, logMiddleware, logger, parseDmSegMobileReply, qtparam, toFetcherMethod, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, validateXiaohongshuParams, wbi_sign, xiaohongshu, xiaohongshuApiUrls, xiaohongshuFetcher, xiaohongshuSign, xiaohongshuUtils };
|
|
29139
29194
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/default/index.mjs
CHANGED
|
@@ -530,6 +530,15 @@ var BilibiliAPI = class {
|
|
|
530
530
|
getUserCard(data) {
|
|
531
531
|
return `https://api.bilibili.com/x/web-interface/card?mid=${data.host_mid}&photo=true`;
|
|
532
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* 按用户 UID 获取直播状态。
|
|
535
|
+
*
|
|
536
|
+
* @remarks
|
|
537
|
+
* 该接口直接返回用户当前直播状态,不依赖空间动态中的直播推荐卡片。
|
|
538
|
+
*/
|
|
539
|
+
getUserLiveStatus(data) {
|
|
540
|
+
return `https://api.live.bilibili.com/room/v1/Room/getRoomInfoOld?mid=${data.host_mid}`;
|
|
541
|
+
}
|
|
533
542
|
/** 获取直播间信息 */
|
|
534
543
|
getLiveRoomInfo(data) {
|
|
535
544
|
return `https://api.live.bilibili.com/room/v1/Room/get_info?room_id=${data.room_id}`;
|
|
@@ -975,6 +984,7 @@ const BilibiliUserParamsSchema = zod.object({
|
|
|
975
984
|
methodType: zod.enum([
|
|
976
985
|
"userCard",
|
|
977
986
|
"userDynamicList",
|
|
987
|
+
"userLiveStatus",
|
|
978
988
|
"uploaderTotalViews",
|
|
979
989
|
"userSpaceInfo"
|
|
980
990
|
], { error: "方法类型必须是指定的枚举值之一" }),
|
|
@@ -1075,6 +1085,7 @@ const BilibiliValidationSchemas = {
|
|
|
1075
1085
|
commentReplies: BilibiliCommentReplyParamsSchema,
|
|
1076
1086
|
userCard: BilibiliUserParamsSchema,
|
|
1077
1087
|
userDynamicList: BilibiliUserParamsSchema,
|
|
1088
|
+
userLiveStatus: BilibiliUserParamsSchema,
|
|
1078
1089
|
userSpaceInfo: BilibiliUserParamsSchema,
|
|
1079
1090
|
emojiList: BilibiliEmojiParamsSchema,
|
|
1080
1091
|
bangumiInfo: BilibiliBangumiInfoParamsSchema,
|
|
@@ -1105,6 +1116,7 @@ const BilibiliMethodRoutes = {
|
|
|
1105
1116
|
commentReplies: "/fetch_comment_reply",
|
|
1106
1117
|
userCard: "/fetch_user_profile",
|
|
1107
1118
|
userDynamicList: "/fetch_user_dynamic",
|
|
1119
|
+
userLiveStatus: "/fetch_user_live_status",
|
|
1108
1120
|
userSpaceInfo: "/fetch_user_space_info",
|
|
1109
1121
|
emojiList: "/fetch_emoji_list",
|
|
1110
1122
|
bangumiInfo: "/fetch_bangumi_video_info",
|
|
@@ -2376,6 +2388,27 @@ async function fetchUserDynamicList(options, cookie, requestConfig) {
|
|
|
2376
2388
|
});
|
|
2377
2389
|
}
|
|
2378
2390
|
/**
|
|
2391
|
+
* 按用户 UID 获取B站直播状态
|
|
2392
|
+
* @param options - 用户参数
|
|
2393
|
+
* @param options.host_mid - 用户 UID
|
|
2394
|
+
* @param cookie - B站 Cookie (可选)
|
|
2395
|
+
* @param requestConfig - 请求配置 (可选)
|
|
2396
|
+
* @returns 用户直播状态与直播间基础信息
|
|
2397
|
+
* @example
|
|
2398
|
+
* ```typescript
|
|
2399
|
+
* const result = await fetchUserLiveStatus({ host_mid: 123456, typeMode: 'strict' }, cookie)
|
|
2400
|
+
* if (result.success && result.data.data.liveStatus === 1) {
|
|
2401
|
+
* console.log(result.data.data.roomid) // 正在直播的房间 ID
|
|
2402
|
+
* }
|
|
2403
|
+
* ```
|
|
2404
|
+
*/
|
|
2405
|
+
async function fetchUserLiveStatus(options, cookie, requestConfig) {
|
|
2406
|
+
return fetchBilibiliInternal("userLiveStatus", options, {
|
|
2407
|
+
cookie,
|
|
2408
|
+
requestConfig
|
|
2409
|
+
});
|
|
2410
|
+
}
|
|
2411
|
+
/**
|
|
2379
2412
|
* 获取B站用户空间详细信息
|
|
2380
2413
|
* @param options - 用户参数
|
|
2381
2414
|
* @param options.host_mid - 用户 UID
|
|
@@ -2556,6 +2589,7 @@ function createBoundBilibiliFetcher(cookie, requestConfig) {
|
|
|
2556
2589
|
fetchCommentReplies: (options) => fetchCommentReplies$1(options, cookie, requestConfig),
|
|
2557
2590
|
fetchUserCard: (options) => fetchUserCard(options, cookie, requestConfig),
|
|
2558
2591
|
fetchUserDynamicList: (options) => fetchUserDynamicList(options, cookie, requestConfig),
|
|
2592
|
+
fetchUserLiveStatus: (options) => fetchUserLiveStatus(options, cookie, requestConfig),
|
|
2559
2593
|
fetchUserSpaceInfo: (options) => fetchUserSpaceInfo(options, cookie, requestConfig),
|
|
2560
2594
|
fetchUploaderTotalViews: (options) => fetchUploaderTotalViews(options, cookie, requestConfig),
|
|
2561
2595
|
fetchDynamicDetail: (options) => fetchDynamicDetail(options, cookie, requestConfig),
|
|
@@ -2603,6 +2637,7 @@ const bilibiliFetcher = {
|
|
|
2603
2637
|
fetchCommentReplies: fetchCommentReplies$1,
|
|
2604
2638
|
fetchUserCard,
|
|
2605
2639
|
fetchUserDynamicList,
|
|
2640
|
+
fetchUserLiveStatus,
|
|
2606
2641
|
fetchUserSpaceInfo,
|
|
2607
2642
|
fetchUploaderTotalViews,
|
|
2608
2643
|
fetchDynamicDetail,
|
|
@@ -8659,6 +8694,10 @@ const fetchBilibili = async (data, cookie, requestConfig) => {
|
|
|
8659
8694
|
url: bilibiliApiUrls.getUserCard({ host_mid })
|
|
8660
8695
|
});
|
|
8661
8696
|
}
|
|
8697
|
+
case "userLiveStatus": return await GlobalGetData(data.methodType, {
|
|
8698
|
+
...baseRequestConfig,
|
|
8699
|
+
url: bilibiliApiUrls.getUserLiveStatus({ host_mid: data.host_mid })
|
|
8700
|
+
});
|
|
8662
8701
|
case "userSpaceInfo": {
|
|
8663
8702
|
const wbiSignQuery = await wbi_sign(bilibiliApiUrls.getUserSpaceInfo({ host_mid: data.host_mid }), baseRequestConfig.headers?.cookie);
|
|
8664
8703
|
return await GlobalGetData(data.methodType, {
|
|
@@ -9744,6 +9783,7 @@ const BilibiliInternalMethods = {
|
|
|
9744
9783
|
COMMENT_REPLIES: "指定评论的回复",
|
|
9745
9784
|
USER_CARD: "用户主页数据",
|
|
9746
9785
|
USER_DYNAMICS: "用户主页动态列表数据",
|
|
9786
|
+
USER_LIVE_STATUS: "用户直播状态",
|
|
9747
9787
|
USER_SPACE_INFO: "用户空间详细信息",
|
|
9748
9788
|
USER_TOTAL_VIEWS: "获取UP主总播放量",
|
|
9749
9789
|
DYNAMIC_DETAIL: "动态详情数据",
|
|
@@ -9774,6 +9814,7 @@ const BilibiliFetcherMethods = {
|
|
|
9774
9814
|
COMMENT_REPLIES: "fetchCommentReplies",
|
|
9775
9815
|
USER_CARD: "fetchUserCard",
|
|
9776
9816
|
USER_DYNAMICS: "fetchUserDynamicList",
|
|
9817
|
+
USER_LIVE_STATUS: "fetchUserLiveStatus",
|
|
9777
9818
|
USER_SPACE_INFO: "fetchUserSpaceInfo",
|
|
9778
9819
|
USER_TOTAL_VIEWS: "fetchUploaderTotalViews",
|
|
9779
9820
|
DYNAMIC_DETAIL: "fetchDynamicDetail",
|
|
@@ -9882,6 +9923,7 @@ const BilibiliMethodToFetcher = {
|
|
|
9882
9923
|
[BilibiliInternalMethods.COMMENT_REPLIES]: BilibiliFetcherMethods.COMMENT_REPLIES,
|
|
9883
9924
|
[BilibiliInternalMethods.USER_CARD]: BilibiliFetcherMethods.USER_CARD,
|
|
9884
9925
|
[BilibiliInternalMethods.USER_DYNAMICS]: BilibiliFetcherMethods.USER_DYNAMICS,
|
|
9926
|
+
[BilibiliInternalMethods.USER_LIVE_STATUS]: BilibiliFetcherMethods.USER_LIVE_STATUS,
|
|
9885
9927
|
[BilibiliInternalMethods.USER_SPACE_INFO]: BilibiliFetcherMethods.USER_SPACE_INFO,
|
|
9886
9928
|
[BilibiliInternalMethods.USER_TOTAL_VIEWS]: BilibiliFetcherMethods.USER_TOTAL_VIEWS,
|
|
9887
9929
|
[BilibiliInternalMethods.DYNAMIC_DETAIL]: BilibiliFetcherMethods.DYNAMIC_DETAIL,
|
|
@@ -10013,6 +10055,7 @@ const BilibiliMethodMapping = {
|
|
|
10013
10055
|
指定评论的回复: "fetchCommentReplies",
|
|
10014
10056
|
用户主页数据: "fetchUserCard",
|
|
10015
10057
|
用户主页动态列表数据: "fetchUserDynamicList",
|
|
10058
|
+
用户直播状态: "fetchUserLiveStatus",
|
|
10016
10059
|
用户空间详细信息: "fetchUserSpaceInfo",
|
|
10017
10060
|
获取UP主总播放量: "fetchUploaderTotalViews",
|
|
10018
10061
|
动态详情数据: "fetchDynamicDetail",
|
|
@@ -10095,6 +10138,7 @@ const BilibiliApiRoutes = {
|
|
|
10095
10138
|
commentReplies: "/comment-replies",
|
|
10096
10139
|
userCard: "/user",
|
|
10097
10140
|
userDynamicList: "/user/dynamics",
|
|
10141
|
+
userLiveStatus: "/user/live-status",
|
|
10098
10142
|
userSpaceInfo: "/user/space",
|
|
10099
10143
|
uploaderTotalViews: "/user/total-views",
|
|
10100
10144
|
dynamicDetail: "/dynamic",
|
|
@@ -10168,7 +10212,7 @@ function getApiRoute(platform, methodType) {
|
|
|
10168
10212
|
* 构建后使用 __VERSION__,开发环境从 package.json 读取
|
|
10169
10213
|
*/
|
|
10170
10214
|
const getVersion = () => {
|
|
10171
|
-
return "6.
|
|
10215
|
+
return "6.3.0";
|
|
10172
10216
|
};
|
|
10173
10217
|
const VERSION = getVersion();
|
|
10174
10218
|
/**
|