migu-api-enhanced 2.3.0 → 2.4.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/index.d.cts CHANGED
@@ -10,7 +10,7 @@ declare const getSearchHot: () => Promise<any>;
10
10
 
11
11
  declare const getSearchDefault: () => Promise<any>;
12
12
 
13
- declare const searchVideo: (text: string, page?: number, typeOrder?: number) => Promise<any>;
13
+ declare const searchMv: (text: string, page?: number, typeOrder?: number) => Promise<any>;
14
14
 
15
15
  declare const searchSuggest: (text: string) => Promise<any>;
16
16
 
@@ -54,7 +54,12 @@ declare const getRadioRecommend: (type?: number) => Promise<any>;
54
54
  declare const getComment: (resourceId: string, resourceType?: number, // 2: 歌曲 D: MV
55
55
  size?: number, hotCommentStart?: number) => Promise<any>;
56
56
 
57
- declare const getResourceInfo: (resourceId: string, resourceType?: number) => Promise<any>;
57
+ /** 获取资源详情
58
+ * @param resourceIds 资源ID列表,多个ID用|分隔 600919000007791840|600929000001520013
59
+ * @param copyrightIds 版权ID列表,多个ID用|分隔 Copyright ID和resource ID可以二选一
60
+ * @param resourceType 资源类型 2: 歌曲 2002:002: 艺术家
61
+ */
62
+ declare const getResourceInfo: (resourceIds?: string, copyrightIds?: string, resourceType?: number) => Promise<any>;
58
63
 
59
64
  declare const checkCanListen: (body: Record<string, any>) => Promise<any>;
60
65
 
@@ -245,6 +250,88 @@ declare const getRadioRecommendAll: (pacmtoken?: string) => Promise<{
245
250
  newPacmToken: string;
246
251
  }>;
247
252
 
253
+ /**
254
+ * 获取短视频详情
255
+ * @param contentIds 短视频ID,多个ID用逗号分隔 (自动处理)
256
+ * @returns 短视频详情
257
+ */
258
+ declare const getSVideoInfo: (contentIds: string) => Promise<any>;
259
+
260
+ declare const searchSVideo: (text: string, page?: number) => Promise<any>;
261
+
262
+ declare const getSVideoSearchSuggest: (text: string) => Promise<any>;
263
+
264
+ /**
265
+ * 获取短视频播放地址
266
+ * @param contentIds 短视频ID,多个ID用,分隔 600985A00005943149,600985A00004881354
267
+ * @param formatType 视频格式,HQ/PQ/SQ 若无自动降级 HQ默认
268
+ * @returns 短视频播放地址
269
+ */
270
+ declare const getSVideoUrl: (contentIds: string, formatType?: string) => Promise<any>;
271
+
272
+ /**
273
+ * 获取用户短视频列表
274
+ * @param videoUserId 用户ID
275
+ * @param nextPageId 分页ID, 第一页时为空, 每个请求都会返回nextPageId
276
+ * @returns 用户短视频列表
277
+ */
278
+ declare const getSVideoUserContent: (videoUserId: string, nextPageId?: string) => Promise<any>;
279
+
280
+ /**
281
+ * 获取视频播放次数
282
+ * @param contentIds 视频ID列表,逗号分隔 600926000022458628,600926000002564425
283
+ * @returns 视频播放次数列表
284
+ */
285
+ declare const getVrbtOpNum: (contentIds: string) => Promise<any>;
286
+
287
+ /**
288
+ * 获取视频彩铃播放URL
289
+ * @param contentIds 视频ID列表,,分隔
290
+ * @returns 视频播放URL列表
291
+ */
292
+ declare const getVrbtUrl: (contentIds: string) => Promise<any>;
293
+
294
+ /**获取歌词(自建)
295
+ * @param contentId 单个歌曲ID,
296
+ * @returns 歌词文本
297
+ */
298
+ declare const getLyric: (contentId: string) => Promise<{
299
+ error: string;
300
+ success: boolean;
301
+ status?: undefined;
302
+ data?: undefined;
303
+ lrc?: undefined;
304
+ lrcUrl?: undefined;
305
+ } | {
306
+ success: boolean;
307
+ status: number;
308
+ error: any;
309
+ data?: undefined;
310
+ lrc?: undefined;
311
+ lrcUrl?: undefined;
312
+ } | {
313
+ error: string;
314
+ success: boolean;
315
+ data: any;
316
+ status?: undefined;
317
+ lrc?: undefined;
318
+ lrcUrl?: undefined;
319
+ } | {
320
+ success: boolean;
321
+ status: number;
322
+ error: string;
323
+ data: any;
324
+ lrc?: undefined;
325
+ lrcUrl?: undefined;
326
+ } | {
327
+ success: boolean;
328
+ lrc: any;
329
+ lrcUrl: any;
330
+ error?: undefined;
331
+ status?: undefined;
332
+ data?: undefined;
333
+ }>;
334
+
248
335
  /**
249
336
  * modules 子目录统一入口
250
337
  * 汇总导出所有 API 函数
@@ -256,6 +343,7 @@ declare const api_checkToken: typeof checkToken;
256
343
  declare const api_getAlbumInfo: typeof getAlbumInfo;
257
344
  declare const api_getAlbumSong: typeof getAlbumSong;
258
345
  declare const api_getComment: typeof getComment;
346
+ declare const api_getLyric: typeof getLyric;
259
347
  declare const api_getMVRecommend: typeof getMVRecommend;
260
348
  declare const api_getMvHls: typeof getMvHls;
261
349
  declare const api_getMvInfo: typeof getMvInfo;
@@ -272,6 +360,10 @@ declare const api_getRankIndex: typeof getRankIndex;
272
360
  declare const api_getRankInfo: typeof getRankInfo;
273
361
  declare const api_getRecommendPlaylist: typeof getRecommendPlaylist;
274
362
  declare const api_getResourceInfo: typeof getResourceInfo;
363
+ declare const api_getSVideoInfo: typeof getSVideoInfo;
364
+ declare const api_getSVideoSearchSuggest: typeof getSVideoSearchSuggest;
365
+ declare const api_getSVideoUrl: typeof getSVideoUrl;
366
+ declare const api_getSVideoUserContent: typeof getSVideoUserContent;
275
367
  declare const api_getSceneRecommend: typeof getSceneRecommend;
276
368
  declare const api_getSearchDefault: typeof getSearchDefault;
277
369
  declare const api_getSearchHot: typeof getSearchHot;
@@ -292,6 +384,8 @@ declare const api_getUserCollect: typeof getUserCollect;
292
384
  declare const api_getUserHomePage: typeof getUserHomePage;
293
385
  declare const api_getUserMyList: typeof getUserMyList;
294
386
  declare const api_getVersion: typeof getVersion;
387
+ declare const api_getVrbtOpNum: typeof getVrbtOpNum;
388
+ declare const api_getVrbtUrl: typeof getVrbtUrl;
295
389
  declare const api_loginNP: typeof loginNP;
296
390
  declare const api_loginOneClick: typeof loginOneClick;
297
391
  declare const api_loginPhone: typeof loginPhone;
@@ -300,14 +394,15 @@ declare const api_queryUserInfo: typeof queryUserInfo;
300
394
  declare const api_searchAlbum: typeof searchAlbum;
301
395
  declare const api_searchConcert: typeof searchConcert;
302
396
  declare const api_searchLrc: typeof searchLrc;
397
+ declare const api_searchMv: typeof searchMv;
303
398
  declare const api_searchRbt: typeof searchRbt;
399
+ declare const api_searchSVideo: typeof searchSVideo;
304
400
  declare const api_searchSinger: typeof searchSinger;
305
401
  declare const api_searchSong: typeof searchSong;
306
402
  declare const api_searchSuggest: typeof searchSuggest;
307
403
  declare const api_searchTicket: typeof searchTicket;
308
- declare const api_searchVideo: typeof searchVideo;
309
404
  declare namespace api {
310
- export { api_YDRZ as YDRZ, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_getAlbumInfo as getAlbumInfo, api_getAlbumSong as getAlbumSong, api_getComment as getComment, api_getMVRecommend as getMVRecommend, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNinanByDate as getNinanByDate, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPlaylistInfo as getPlaylistInfo, api_getPlaylistSong as getPlaylistSong, api_getPlaylistSquare as getPlaylistSquare, api_getRadioRecommend as getRadioRecommend, api_getRadioRecommendAll as getRadioRecommendAll, api_getRankIndex as getRankIndex, api_getRankInfo as getRankInfo, api_getRecommendPlaylist as getRecommendPlaylist, api_getResourceInfo as getResourceInfo, api_getSceneRecommend as getSceneRecommend, api_getSearchDefault as getSearchDefault, api_getSearchHot as getSearchHot, api_getSearchSingerTab as getSearchSingerTab, api_getSearchSingerTabList as getSearchSingerTabList, api_getSimilarSongRecommend as getSimilarSongRecommend, api_getSingerAlbum as getSingerAlbum, api_getSingerIndex as getSingerIndex, api_getSingerSimilar as getSingerSimilar, api_getSingerSong as getSingerSong, api_getTicketInfo as getTicketInfo, api_getTodayRecommend as getTodayRecommend, api_getUrlH5V24 as getUrlH5V24, api_getUrlV1 as getUrlV1, api_getUrlV2 as getUrlV2, api_getUserBadge as getUserBadge, api_getUserCollect as getUserCollect, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getVersion as getVersion, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_queryUserInfo as queryUserInfo, api_searchAlbum as searchAlbum, api_searchConcert as searchConcert, api_searchLrc as searchLrc, api_searchRbt as searchRbt, api_searchSinger as searchSinger, api_searchSong as searchSong, api_searchSuggest as searchSuggest, api_searchTicket as searchTicket, api_searchVideo as searchVideo };
405
+ export { api_YDRZ as YDRZ, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_getAlbumInfo as getAlbumInfo, api_getAlbumSong as getAlbumSong, api_getComment as getComment, api_getLyric as getLyric, api_getMVRecommend as getMVRecommend, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNinanByDate as getNinanByDate, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPlaylistInfo as getPlaylistInfo, api_getPlaylistSong as getPlaylistSong, api_getPlaylistSquare as getPlaylistSquare, api_getRadioRecommend as getRadioRecommend, api_getRadioRecommendAll as getRadioRecommendAll, api_getRankIndex as getRankIndex, api_getRankInfo as getRankInfo, api_getRecommendPlaylist as getRecommendPlaylist, api_getResourceInfo as getResourceInfo, api_getSVideoInfo as getSVideoInfo, api_getSVideoSearchSuggest as getSVideoSearchSuggest, api_getSVideoUrl as getSVideoUrl, api_getSVideoUserContent as getSVideoUserContent, api_getSceneRecommend as getSceneRecommend, api_getSearchDefault as getSearchDefault, api_getSearchHot as getSearchHot, api_getSearchSingerTab as getSearchSingerTab, api_getSearchSingerTabList as getSearchSingerTabList, api_getSimilarSongRecommend as getSimilarSongRecommend, api_getSingerAlbum as getSingerAlbum, api_getSingerIndex as getSingerIndex, api_getSingerSimilar as getSingerSimilar, api_getSingerSong as getSingerSong, api_getTicketInfo as getTicketInfo, api_getTodayRecommend as getTodayRecommend, api_getUrlH5V24 as getUrlH5V24, api_getUrlV1 as getUrlV1, api_getUrlV2 as getUrlV2, api_getUserBadge as getUserBadge, api_getUserCollect as getUserCollect, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getVersion as getVersion, api_getVrbtOpNum as getVrbtOpNum, api_getVrbtUrl as getVrbtUrl, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_queryUserInfo as queryUserInfo, api_searchAlbum as searchAlbum, api_searchConcert as searchConcert, api_searchLrc as searchLrc, api_searchMv as searchMv, api_searchRbt as searchRbt, api_searchSVideo as searchSVideo, api_searchSinger as searchSinger, api_searchSong as searchSong, api_searchSuggest as searchSuggest, api_searchTicket as searchTicket };
311
406
  }
312
407
 
313
408
  declare const ua: string[];
@@ -353,4 +448,4 @@ declare function createClient(): typeof api;
353
448
  /** 客户端类型 */
354
449
  type MiguClient = ReturnType<typeof createClient>;
355
450
 
356
- export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, checkCanListen, checkToken, createClient, getAlbumInfo, getAlbumSong, getComment, getDeviceId, getMVRecommend, getMvHls, getMvInfo, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPlaylistSquare, getPublicKey, getRadioRecommend, getRadioRecommendAll, getRankIndex, getRankInfo, getRecommendPlaylist, getResourceInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollect, getUserHomePage, getUserMyList, getVersion, loginNP, loginOneClick, loginPhone, loginSim, api as modules, queryUserInfo, randomUA, searchAlbum, searchConcert, searchLrc, searchRbt, searchSinger, searchSong, searchSuggest, searchTicket, searchVideo, ua };
451
+ export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, checkCanListen, checkToken, createClient, getAlbumInfo, getAlbumSong, getComment, getDeviceId, getLyric, getMVRecommend, getMvHls, getMvInfo, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPlaylistSquare, getPublicKey, getRadioRecommend, getRadioRecommendAll, getRankIndex, getRankInfo, getRecommendPlaylist, getResourceInfo, getSVideoInfo, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollect, getUserHomePage, getUserMyList, getVersion, getVrbtOpNum, getVrbtUrl, loginNP, loginOneClick, loginPhone, loginSim, api as modules, queryUserInfo, randomUA, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, ua };
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ declare const getSearchHot: () => Promise<any>;
10
10
 
11
11
  declare const getSearchDefault: () => Promise<any>;
12
12
 
13
- declare const searchVideo: (text: string, page?: number, typeOrder?: number) => Promise<any>;
13
+ declare const searchMv: (text: string, page?: number, typeOrder?: number) => Promise<any>;
14
14
 
15
15
  declare const searchSuggest: (text: string) => Promise<any>;
16
16
 
@@ -54,7 +54,12 @@ declare const getRadioRecommend: (type?: number) => Promise<any>;
54
54
  declare const getComment: (resourceId: string, resourceType?: number, // 2: 歌曲 D: MV
55
55
  size?: number, hotCommentStart?: number) => Promise<any>;
56
56
 
57
- declare const getResourceInfo: (resourceId: string, resourceType?: number) => Promise<any>;
57
+ /** 获取资源详情
58
+ * @param resourceIds 资源ID列表,多个ID用|分隔 600919000007791840|600929000001520013
59
+ * @param copyrightIds 版权ID列表,多个ID用|分隔 Copyright ID和resource ID可以二选一
60
+ * @param resourceType 资源类型 2: 歌曲 2002:002: 艺术家
61
+ */
62
+ declare const getResourceInfo: (resourceIds?: string, copyrightIds?: string, resourceType?: number) => Promise<any>;
58
63
 
59
64
  declare const checkCanListen: (body: Record<string, any>) => Promise<any>;
60
65
 
@@ -245,6 +250,88 @@ declare const getRadioRecommendAll: (pacmtoken?: string) => Promise<{
245
250
  newPacmToken: string;
246
251
  }>;
247
252
 
253
+ /**
254
+ * 获取短视频详情
255
+ * @param contentIds 短视频ID,多个ID用逗号分隔 (自动处理)
256
+ * @returns 短视频详情
257
+ */
258
+ declare const getSVideoInfo: (contentIds: string) => Promise<any>;
259
+
260
+ declare const searchSVideo: (text: string, page?: number) => Promise<any>;
261
+
262
+ declare const getSVideoSearchSuggest: (text: string) => Promise<any>;
263
+
264
+ /**
265
+ * 获取短视频播放地址
266
+ * @param contentIds 短视频ID,多个ID用,分隔 600985A00005943149,600985A00004881354
267
+ * @param formatType 视频格式,HQ/PQ/SQ 若无自动降级 HQ默认
268
+ * @returns 短视频播放地址
269
+ */
270
+ declare const getSVideoUrl: (contentIds: string, formatType?: string) => Promise<any>;
271
+
272
+ /**
273
+ * 获取用户短视频列表
274
+ * @param videoUserId 用户ID
275
+ * @param nextPageId 分页ID, 第一页时为空, 每个请求都会返回nextPageId
276
+ * @returns 用户短视频列表
277
+ */
278
+ declare const getSVideoUserContent: (videoUserId: string, nextPageId?: string) => Promise<any>;
279
+
280
+ /**
281
+ * 获取视频播放次数
282
+ * @param contentIds 视频ID列表,逗号分隔 600926000022458628,600926000002564425
283
+ * @returns 视频播放次数列表
284
+ */
285
+ declare const getVrbtOpNum: (contentIds: string) => Promise<any>;
286
+
287
+ /**
288
+ * 获取视频彩铃播放URL
289
+ * @param contentIds 视频ID列表,,分隔
290
+ * @returns 视频播放URL列表
291
+ */
292
+ declare const getVrbtUrl: (contentIds: string) => Promise<any>;
293
+
294
+ /**获取歌词(自建)
295
+ * @param contentId 单个歌曲ID,
296
+ * @returns 歌词文本
297
+ */
298
+ declare const getLyric: (contentId: string) => Promise<{
299
+ error: string;
300
+ success: boolean;
301
+ status?: undefined;
302
+ data?: undefined;
303
+ lrc?: undefined;
304
+ lrcUrl?: undefined;
305
+ } | {
306
+ success: boolean;
307
+ status: number;
308
+ error: any;
309
+ data?: undefined;
310
+ lrc?: undefined;
311
+ lrcUrl?: undefined;
312
+ } | {
313
+ error: string;
314
+ success: boolean;
315
+ data: any;
316
+ status?: undefined;
317
+ lrc?: undefined;
318
+ lrcUrl?: undefined;
319
+ } | {
320
+ success: boolean;
321
+ status: number;
322
+ error: string;
323
+ data: any;
324
+ lrc?: undefined;
325
+ lrcUrl?: undefined;
326
+ } | {
327
+ success: boolean;
328
+ lrc: any;
329
+ lrcUrl: any;
330
+ error?: undefined;
331
+ status?: undefined;
332
+ data?: undefined;
333
+ }>;
334
+
248
335
  /**
249
336
  * modules 子目录统一入口
250
337
  * 汇总导出所有 API 函数
@@ -256,6 +343,7 @@ declare const api_checkToken: typeof checkToken;
256
343
  declare const api_getAlbumInfo: typeof getAlbumInfo;
257
344
  declare const api_getAlbumSong: typeof getAlbumSong;
258
345
  declare const api_getComment: typeof getComment;
346
+ declare const api_getLyric: typeof getLyric;
259
347
  declare const api_getMVRecommend: typeof getMVRecommend;
260
348
  declare const api_getMvHls: typeof getMvHls;
261
349
  declare const api_getMvInfo: typeof getMvInfo;
@@ -272,6 +360,10 @@ declare const api_getRankIndex: typeof getRankIndex;
272
360
  declare const api_getRankInfo: typeof getRankInfo;
273
361
  declare const api_getRecommendPlaylist: typeof getRecommendPlaylist;
274
362
  declare const api_getResourceInfo: typeof getResourceInfo;
363
+ declare const api_getSVideoInfo: typeof getSVideoInfo;
364
+ declare const api_getSVideoSearchSuggest: typeof getSVideoSearchSuggest;
365
+ declare const api_getSVideoUrl: typeof getSVideoUrl;
366
+ declare const api_getSVideoUserContent: typeof getSVideoUserContent;
275
367
  declare const api_getSceneRecommend: typeof getSceneRecommend;
276
368
  declare const api_getSearchDefault: typeof getSearchDefault;
277
369
  declare const api_getSearchHot: typeof getSearchHot;
@@ -292,6 +384,8 @@ declare const api_getUserCollect: typeof getUserCollect;
292
384
  declare const api_getUserHomePage: typeof getUserHomePage;
293
385
  declare const api_getUserMyList: typeof getUserMyList;
294
386
  declare const api_getVersion: typeof getVersion;
387
+ declare const api_getVrbtOpNum: typeof getVrbtOpNum;
388
+ declare const api_getVrbtUrl: typeof getVrbtUrl;
295
389
  declare const api_loginNP: typeof loginNP;
296
390
  declare const api_loginOneClick: typeof loginOneClick;
297
391
  declare const api_loginPhone: typeof loginPhone;
@@ -300,14 +394,15 @@ declare const api_queryUserInfo: typeof queryUserInfo;
300
394
  declare const api_searchAlbum: typeof searchAlbum;
301
395
  declare const api_searchConcert: typeof searchConcert;
302
396
  declare const api_searchLrc: typeof searchLrc;
397
+ declare const api_searchMv: typeof searchMv;
303
398
  declare const api_searchRbt: typeof searchRbt;
399
+ declare const api_searchSVideo: typeof searchSVideo;
304
400
  declare const api_searchSinger: typeof searchSinger;
305
401
  declare const api_searchSong: typeof searchSong;
306
402
  declare const api_searchSuggest: typeof searchSuggest;
307
403
  declare const api_searchTicket: typeof searchTicket;
308
- declare const api_searchVideo: typeof searchVideo;
309
404
  declare namespace api {
310
- export { api_YDRZ as YDRZ, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_getAlbumInfo as getAlbumInfo, api_getAlbumSong as getAlbumSong, api_getComment as getComment, api_getMVRecommend as getMVRecommend, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNinanByDate as getNinanByDate, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPlaylistInfo as getPlaylistInfo, api_getPlaylistSong as getPlaylistSong, api_getPlaylistSquare as getPlaylistSquare, api_getRadioRecommend as getRadioRecommend, api_getRadioRecommendAll as getRadioRecommendAll, api_getRankIndex as getRankIndex, api_getRankInfo as getRankInfo, api_getRecommendPlaylist as getRecommendPlaylist, api_getResourceInfo as getResourceInfo, api_getSceneRecommend as getSceneRecommend, api_getSearchDefault as getSearchDefault, api_getSearchHot as getSearchHot, api_getSearchSingerTab as getSearchSingerTab, api_getSearchSingerTabList as getSearchSingerTabList, api_getSimilarSongRecommend as getSimilarSongRecommend, api_getSingerAlbum as getSingerAlbum, api_getSingerIndex as getSingerIndex, api_getSingerSimilar as getSingerSimilar, api_getSingerSong as getSingerSong, api_getTicketInfo as getTicketInfo, api_getTodayRecommend as getTodayRecommend, api_getUrlH5V24 as getUrlH5V24, api_getUrlV1 as getUrlV1, api_getUrlV2 as getUrlV2, api_getUserBadge as getUserBadge, api_getUserCollect as getUserCollect, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getVersion as getVersion, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_queryUserInfo as queryUserInfo, api_searchAlbum as searchAlbum, api_searchConcert as searchConcert, api_searchLrc as searchLrc, api_searchRbt as searchRbt, api_searchSinger as searchSinger, api_searchSong as searchSong, api_searchSuggest as searchSuggest, api_searchTicket as searchTicket, api_searchVideo as searchVideo };
405
+ export { api_YDRZ as YDRZ, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_getAlbumInfo as getAlbumInfo, api_getAlbumSong as getAlbumSong, api_getComment as getComment, api_getLyric as getLyric, api_getMVRecommend as getMVRecommend, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNinanByDate as getNinanByDate, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPlaylistInfo as getPlaylistInfo, api_getPlaylistSong as getPlaylistSong, api_getPlaylistSquare as getPlaylistSquare, api_getRadioRecommend as getRadioRecommend, api_getRadioRecommendAll as getRadioRecommendAll, api_getRankIndex as getRankIndex, api_getRankInfo as getRankInfo, api_getRecommendPlaylist as getRecommendPlaylist, api_getResourceInfo as getResourceInfo, api_getSVideoInfo as getSVideoInfo, api_getSVideoSearchSuggest as getSVideoSearchSuggest, api_getSVideoUrl as getSVideoUrl, api_getSVideoUserContent as getSVideoUserContent, api_getSceneRecommend as getSceneRecommend, api_getSearchDefault as getSearchDefault, api_getSearchHot as getSearchHot, api_getSearchSingerTab as getSearchSingerTab, api_getSearchSingerTabList as getSearchSingerTabList, api_getSimilarSongRecommend as getSimilarSongRecommend, api_getSingerAlbum as getSingerAlbum, api_getSingerIndex as getSingerIndex, api_getSingerSimilar as getSingerSimilar, api_getSingerSong as getSingerSong, api_getTicketInfo as getTicketInfo, api_getTodayRecommend as getTodayRecommend, api_getUrlH5V24 as getUrlH5V24, api_getUrlV1 as getUrlV1, api_getUrlV2 as getUrlV2, api_getUserBadge as getUserBadge, api_getUserCollect as getUserCollect, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getVersion as getVersion, api_getVrbtOpNum as getVrbtOpNum, api_getVrbtUrl as getVrbtUrl, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_queryUserInfo as queryUserInfo, api_searchAlbum as searchAlbum, api_searchConcert as searchConcert, api_searchLrc as searchLrc, api_searchMv as searchMv, api_searchRbt as searchRbt, api_searchSVideo as searchSVideo, api_searchSinger as searchSinger, api_searchSong as searchSong, api_searchSuggest as searchSuggest, api_searchTicket as searchTicket };
311
406
  }
312
407
 
313
408
  declare const ua: string[];
@@ -353,4 +448,4 @@ declare function createClient(): typeof api;
353
448
  /** 客户端类型 */
354
449
  type MiguClient = ReturnType<typeof createClient>;
355
450
 
356
- export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, checkCanListen, checkToken, createClient, getAlbumInfo, getAlbumSong, getComment, getDeviceId, getMVRecommend, getMvHls, getMvInfo, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPlaylistSquare, getPublicKey, getRadioRecommend, getRadioRecommendAll, getRankIndex, getRankInfo, getRecommendPlaylist, getResourceInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollect, getUserHomePage, getUserMyList, getVersion, loginNP, loginOneClick, loginPhone, loginSim, api as modules, queryUserInfo, randomUA, searchAlbum, searchConcert, searchLrc, searchRbt, searchSinger, searchSong, searchSuggest, searchTicket, searchVideo, ua };
451
+ export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, checkCanListen, checkToken, createClient, getAlbumInfo, getAlbumSong, getComment, getDeviceId, getLyric, getMVRecommend, getMvHls, getMvInfo, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPlaylistSquare, getPublicKey, getRadioRecommend, getRadioRecommendAll, getRankIndex, getRankInfo, getRecommendPlaylist, getResourceInfo, getSVideoInfo, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollect, getUserHomePage, getUserMyList, getVersion, getVrbtOpNum, getVrbtUrl, loginNP, loginOneClick, loginPhone, loginSim, api as modules, queryUserInfo, randomUA, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, ua };
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ __export(modules_exports, {
13
13
  getAlbumInfo: () => getAlbumInfo,
14
14
  getAlbumSong: () => getAlbumSong,
15
15
  getComment: () => getComment,
16
+ getLyric: () => getLyric,
16
17
  getMVRecommend: () => getMVRecommend,
17
18
  getMvHls: () => getMvHls,
18
19
  getMvInfo: () => getMvInfo,
@@ -29,6 +30,10 @@ __export(modules_exports, {
29
30
  getRankInfo: () => getRankInfo,
30
31
  getRecommendPlaylist: () => getRecommendPlaylist,
31
32
  getResourceInfo: () => getResourceInfo,
33
+ getSVideoInfo: () => getSVideoInfo,
34
+ getSVideoSearchSuggest: () => getSVideoSearchSuggest,
35
+ getSVideoUrl: () => getSVideoUrl,
36
+ getSVideoUserContent: () => getSVideoUserContent,
32
37
  getSceneRecommend: () => getSceneRecommend,
33
38
  getSearchDefault: () => getSearchDefault,
34
39
  getSearchHot: () => getSearchHot,
@@ -49,6 +54,8 @@ __export(modules_exports, {
49
54
  getUserHomePage: () => getUserHomePage,
50
55
  getUserMyList: () => getUserMyList,
51
56
  getVersion: () => getVersion,
57
+ getVrbtOpNum: () => getVrbtOpNum,
58
+ getVrbtUrl: () => getVrbtUrl,
52
59
  loginNP: () => loginNP,
53
60
  loginOneClick: () => loginOneClick,
54
61
  loginPhone: () => loginPhone,
@@ -57,12 +64,13 @@ __export(modules_exports, {
57
64
  searchAlbum: () => searchAlbum,
58
65
  searchConcert: () => searchConcert,
59
66
  searchLrc: () => searchLrc,
67
+ searchMv: () => searchMv,
60
68
  searchRbt: () => searchRbt,
69
+ searchSVideo: () => searchSVideo,
61
70
  searchSinger: () => searchSinger,
62
71
  searchSong: () => searchSong,
63
72
  searchSuggest: () => searchSuggest,
64
- searchTicket: () => searchTicket,
65
- searchVideo: () => searchVideo
73
+ searchTicket: () => searchTicket
66
74
  });
67
75
 
68
76
  // src/utils/h5fetch.ts
@@ -127,8 +135,8 @@ var getSearchDefault = async () => {
127
135
  return await h5fetch(`http://app.c.nf.migu.cn/column/search/default-text/v3.0?resourceVersion=2`);
128
136
  };
129
137
 
130
- // src/modules/search_video.ts
131
- var searchVideo = async (text, page = 1, typeOrder = 0) => {
138
+ // src/modules/search_mv.ts
139
+ var searchMv = async (text, page = 1, typeOrder = 0) => {
132
140
  return await h5fetch(`http://app.c.nf.migu.cn/bmw/search/video/v1.0?pageNo=${page}&text=${text}&typeOrder=${typeOrder}`);
133
141
  };
134
142
 
@@ -266,8 +274,10 @@ var getComment = async (resourceId, resourceType = 2, size = 20, hotCommentStart
266
274
  };
267
275
 
268
276
  // src/modules/resourceinfo.ts
269
- var getResourceInfo = async (resourceId, resourceType = 2) => {
270
- return await h5fetch(`https://app.u.nf.migu.cn//MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${resourceId}&resourceType=${resourceType}`);
277
+ var getResourceInfo = async (resourceIds = "", copyrightIds = "", resourceType = 2) => {
278
+ resourceIds = resourceIds.replace(/,/g, "|");
279
+ copyrightIds = copyrightIds.replace(/,/g, "|");
280
+ return await h5fetch(`https://app.u.nf.migu.cn/MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${resourceIds}&copyrightId=${copyrightIds}&resourceType=${resourceType}`);
271
281
  };
272
282
 
273
283
  // src/modules/can-listen.ts
@@ -1142,6 +1152,91 @@ var getRadioRecommendAll = async (pacmtoken = "") => {
1142
1152
  return { data: res.data, newPacmToken };
1143
1153
  };
1144
1154
 
1155
+ // src/modules/svideo_info.ts
1156
+ var getSVideoInfo = async (contentIds) => {
1157
+ const contentIdList = contentIds.split(",");
1158
+ contentIdList.map((item) => {
1159
+ return "6000," + item;
1160
+ }).join("|");
1161
+ return await h5fetch(`https://app.c.nf.migu.cn/resource/video-info/by-id/v1.0?requestParams=${contentIdList}`);
1162
+ };
1163
+
1164
+ // src/modules/svideo_search.ts
1165
+ var searchSVideo = async (text, page = 1) => {
1166
+ return await h5fetch(
1167
+ `https://app.c.nf.migu.cn/bmw/hot-search/search/videos/v1.0?pageIndex=${page}&text=${text}`,
1168
+ {
1169
+ headers: {
1170
+ "deviceid": getDeviceId()
1171
+ }
1172
+ }
1173
+ );
1174
+ };
1175
+
1176
+ // src/modules/svideo_searchSuggest.ts
1177
+ var getSVideoSearchSuggest = async (text) => {
1178
+ return await h5fetch(`https://app.c.nf.migu.cn/resource-dataloader/search-suggest/search/v1.0?text=${text}`);
1179
+ };
1180
+
1181
+ // src/modules/svideo_url.ts
1182
+ var getSVideoUrl = async (contentIds, formatType = "HQ") => {
1183
+ contentIds = contentIds.replace(/,/g, "|");
1184
+ return await h5fetch(`https://app.c.nf.migu.cn/strategy/short-video/play/v1.0?contentIds=${contentIds}&formatType=${formatType}`);
1185
+ };
1186
+
1187
+ // src/modules/svideo_userContent.ts
1188
+ var getSVideoUserContent = async (videoUserId, nextPageId = "") => {
1189
+ return await h5fetch(`https://app.c.nf.migu.cn/user/i/user-content-list/v1.0?nextPageId=${nextPageId}&videoUserId=${videoUserId}`);
1190
+ };
1191
+
1192
+ // src/modules/vrbt_opNum.ts
1193
+ var getVrbtOpNum = async (contentIds) => {
1194
+ return await h5fetch(`https://app.c.nf.migu.cn/resource/vrbt/opnum/v1.0?resourceType=M&contentIds=${contentIds}`);
1195
+ };
1196
+
1197
+ // src/modules/vrbt_url.ts
1198
+ var getVrbtUrl = async (contentIds) => {
1199
+ contentIds = contentIds.replace(/,/g, "|");
1200
+ return await h5fetch(
1201
+ `https://app.c.nf.migu.cn/strategy/vrbt/play/v1.0?contentIds=${contentIds}`,
1202
+ {
1203
+ headers: {
1204
+ "channel": "014X031"
1205
+ }
1206
+ }
1207
+ );
1208
+ };
1209
+
1210
+ // src/modules/lyric.ts
1211
+ import axios16 from "axios";
1212
+ var getLyric = async (contentId) => {
1213
+ if (contentId === "") return { error: "contentId is empty!", success: false };
1214
+ const res = await axios16.get(`https://app.c.nf.migu.cn/resource/song/by-contentids/v2.0?contentId=${contentId}`);
1215
+ const code = res.data.code.toString() || "";
1216
+ const data = res.data.data || [];
1217
+ if (code !== "000000") return {
1218
+ success: false,
1219
+ status: res.status,
1220
+ error: res.data.info || res.data
1221
+ };
1222
+ if (data.length === 0) return { error: "data.length = 0 !", success: false, data };
1223
+ const lrcUrl = data[0].lrcUrl || "";
1224
+ if (lrcUrl === "") return { error: "lrcUrl is empty!", success: false, data };
1225
+ const lrcRes = await axios16.get(lrcUrl);
1226
+ if (lrcRes.status !== 200) return {
1227
+ success: false,
1228
+ status: lrcRes.status,
1229
+ error: "lrcRes.status !== 200 !",
1230
+ data
1231
+ };
1232
+ const lrc = lrcRes.data || "";
1233
+ return {
1234
+ success: true,
1235
+ lrc,
1236
+ lrcUrl
1237
+ };
1238
+ };
1239
+
1145
1240
  // src/utils/index.ts
1146
1241
  var utils_exports = {};
1147
1242
  __export(utils_exports, {
@@ -1182,6 +1277,7 @@ export {
1182
1277
  getAlbumSong,
1183
1278
  getComment,
1184
1279
  getDeviceId,
1280
+ getLyric,
1185
1281
  getMVRecommend,
1186
1282
  getMvHls,
1187
1283
  getMvInfo,
@@ -1199,6 +1295,10 @@ export {
1199
1295
  getRankInfo,
1200
1296
  getRecommendPlaylist,
1201
1297
  getResourceInfo,
1298
+ getSVideoInfo,
1299
+ getSVideoSearchSuggest,
1300
+ getSVideoUrl,
1301
+ getSVideoUserContent,
1202
1302
  getSceneRecommend,
1203
1303
  getSearchDefault,
1204
1304
  getSearchHot,
@@ -1219,6 +1319,8 @@ export {
1219
1319
  getUserHomePage,
1220
1320
  getUserMyList,
1221
1321
  getVersion,
1322
+ getVrbtOpNum,
1323
+ getVrbtUrl,
1222
1324
  loginNP,
1223
1325
  loginOneClick,
1224
1326
  loginPhone,
@@ -1229,12 +1331,13 @@ export {
1229
1331
  searchAlbum,
1230
1332
  searchConcert,
1231
1333
  searchLrc,
1334
+ searchMv,
1232
1335
  searchRbt,
1336
+ searchSVideo,
1233
1337
  searchSinger,
1234
1338
  searchSong,
1235
1339
  searchSuggest,
1236
1340
  searchTicket,
1237
- searchVideo,
1238
1341
  ua
1239
1342
  };
1240
1343
  //# sourceMappingURL=index.js.map