migu-api-enhanced 2.6.0 → 2.9.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.cjs +93 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -5
- package/dist/index.d.ts +85 -5
- package/dist/index.js +86 -9
- package/dist/index.js.map +1 -1
- package/package.json +80 -75
package/dist/index.d.cts
CHANGED
|
@@ -61,7 +61,11 @@ size?: number, hotCommentStart?: number) => Promise<any>;
|
|
|
61
61
|
*/
|
|
62
62
|
declare const getResourceInfo: (resourceIds?: string, copyrightIds?: string, resourceType?: number) => Promise<any>;
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
/** 检查是否可以播放
|
|
65
|
+
* @param contentIds 内容ID列表,逗号分隔
|
|
66
|
+
* @return
|
|
67
|
+
*/
|
|
68
|
+
declare const checkCanListen: (contentIds: string) => Promise<any>;
|
|
65
69
|
|
|
66
70
|
declare const getOpNum: (ids: string) => Promise<any>;
|
|
67
71
|
|
|
@@ -231,7 +235,7 @@ declare const loginPhone: {
|
|
|
231
235
|
*/
|
|
232
236
|
declare const getMVRecommend: (mvContentId: string, page?: number) => Promise<any>;
|
|
233
237
|
|
|
234
|
-
declare const
|
|
238
|
+
declare const getPlaylistSquarePage: () => Promise<any>;
|
|
235
239
|
|
|
236
240
|
declare const searchLrc: (text: string, page?: number) => Promise<any>;
|
|
237
241
|
|
|
@@ -373,27 +377,98 @@ declare const dislikeSong: (pacmtoken: string, contentId: string) => Promise<{
|
|
|
373
377
|
newPacmToken: string;
|
|
374
378
|
}>;
|
|
375
379
|
|
|
380
|
+
/**
|
|
381
|
+
* 编辑播放列表
|
|
382
|
+
* @param pacmtoken 用户token
|
|
383
|
+
* @param title 播放列表名称
|
|
384
|
+
* @param playlistId 播放列表id
|
|
385
|
+
* @returns
|
|
386
|
+
*/
|
|
376
387
|
declare const editUserMyList: (pacmtoken: string, title: string, playlistId: string) => Promise<{
|
|
377
388
|
data: any;
|
|
378
389
|
newPacmToken: string;
|
|
379
390
|
}>;
|
|
380
391
|
|
|
392
|
+
/**
|
|
393
|
+
* 创建播放列表
|
|
394
|
+
* @param pacmtoken 用户token
|
|
395
|
+
* @param title 播放列表名称
|
|
396
|
+
* @returns
|
|
397
|
+
*/
|
|
381
398
|
declare const addUserMyList: (pacmtoken: string, title: string) => Promise<{
|
|
382
399
|
data: any;
|
|
383
400
|
newPacmToken: string;
|
|
384
401
|
}>;
|
|
385
402
|
|
|
403
|
+
/**
|
|
404
|
+
* 删除播放列表
|
|
405
|
+
* @param pacmtoken 用户token
|
|
406
|
+
* @param playlistId 播放列表id
|
|
407
|
+
* @returns
|
|
408
|
+
*/
|
|
386
409
|
declare const removeUserMyList: (pacmtoken: string, playlistId: string) => Promise<{
|
|
387
410
|
data: any;
|
|
388
411
|
newPacmToken: string;
|
|
389
412
|
}>;
|
|
390
413
|
|
|
414
|
+
/**
|
|
415
|
+
* 获取电台歌曲
|
|
416
|
+
* @param radioId 电台ID
|
|
417
|
+
* @param page 页码
|
|
418
|
+
* @returns
|
|
419
|
+
*/
|
|
420
|
+
declare const getRadioSong: (radioId: string, page?: number) => Promise<any>;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* 新碟上架
|
|
424
|
+
* @returns
|
|
425
|
+
*/
|
|
426
|
+
declare const getNewCDList: () => Promise<any>;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* 新歌速递
|
|
430
|
+
* @returns
|
|
431
|
+
*/
|
|
432
|
+
declare const getNewSongList: () => Promise<any>;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* 栏目内容
|
|
436
|
+
* @param columnId 栏目ID
|
|
437
|
+
* @returns
|
|
438
|
+
*/
|
|
439
|
+
declare const getColumnInfo: (columnId: string) => Promise<any>;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* 添加歌曲到播放列表
|
|
443
|
+
* @param pacmtoken
|
|
444
|
+
* @param playlistId 播放列表id
|
|
445
|
+
* @param contentIds 歌曲id列表,逗号分隔
|
|
446
|
+
* @returns
|
|
447
|
+
*/
|
|
448
|
+
declare const addSongToMyList: (pacmtoken: string, playlistId: string, contentIds: string) => Promise<{
|
|
449
|
+
data: any;
|
|
450
|
+
newPacmToken: string;
|
|
451
|
+
}>;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* 删除播放列表中的歌曲
|
|
455
|
+
* @param pacmtoken 用户token
|
|
456
|
+
* @param playlistId 播放列表id
|
|
457
|
+
* @param contentId 单个歌曲id
|
|
458
|
+
* @returns
|
|
459
|
+
*/
|
|
460
|
+
declare const removeSongFromMyList: (pacmtoken: string, playlistId: string, contentId: string) => Promise<{
|
|
461
|
+
data: any;
|
|
462
|
+
newPacmToken: string;
|
|
463
|
+
}>;
|
|
464
|
+
|
|
391
465
|
/**
|
|
392
466
|
* modules 子目录统一入口
|
|
393
467
|
* 汇总导出所有 API 函数
|
|
394
468
|
*/
|
|
395
469
|
|
|
396
470
|
declare const api_YDRZ: typeof YDRZ;
|
|
471
|
+
declare const api_addSongToMyList: typeof addSongToMyList;
|
|
397
472
|
declare const api_addUserCollect: typeof addUserCollect;
|
|
398
473
|
declare const api_addUserMyList: typeof addUserMyList;
|
|
399
474
|
declare const api_checkCanListen: typeof checkCanListen;
|
|
@@ -402,20 +477,24 @@ declare const api_dislikeSong: typeof dislikeSong;
|
|
|
402
477
|
declare const api_editUserMyList: typeof editUserMyList;
|
|
403
478
|
declare const api_getAlbumInfo: typeof getAlbumInfo;
|
|
404
479
|
declare const api_getAlbumSong: typeof getAlbumSong;
|
|
480
|
+
declare const api_getColumnInfo: typeof getColumnInfo;
|
|
405
481
|
declare const api_getComment: typeof getComment;
|
|
406
482
|
declare const api_getLyric: typeof getLyric;
|
|
407
483
|
declare const api_getMVRecommend: typeof getMVRecommend;
|
|
408
484
|
declare const api_getMvHls: typeof getMvHls;
|
|
409
485
|
declare const api_getMvInfo: typeof getMvInfo;
|
|
486
|
+
declare const api_getNewCDList: typeof getNewCDList;
|
|
487
|
+
declare const api_getNewSongList: typeof getNewSongList;
|
|
410
488
|
declare const api_getNinanByDate: typeof getNinanByDate;
|
|
411
489
|
declare const api_getNinanSong: typeof getNinanSong;
|
|
412
490
|
declare const api_getOpNum: typeof getOpNum;
|
|
413
491
|
declare const api_getPacmToken: typeof getPacmToken;
|
|
414
492
|
declare const api_getPlaylistInfo: typeof getPlaylistInfo;
|
|
415
493
|
declare const api_getPlaylistSong: typeof getPlaylistSong;
|
|
416
|
-
declare const
|
|
494
|
+
declare const api_getPlaylistSquarePage: typeof getPlaylistSquarePage;
|
|
417
495
|
declare const api_getRadioRecommend: typeof getRadioRecommend;
|
|
418
496
|
declare const api_getRadioRecommendAll: typeof getRadioRecommendAll;
|
|
497
|
+
declare const api_getRadioSong: typeof getRadioSong;
|
|
419
498
|
declare const api_getRankIndex: typeof getRankIndex;
|
|
420
499
|
declare const api_getRankInfo: typeof getRankInfo;
|
|
421
500
|
declare const api_getRecommendPlaylist: typeof getRecommendPlaylist;
|
|
@@ -452,6 +531,7 @@ declare const api_loginOneClick: typeof loginOneClick;
|
|
|
452
531
|
declare const api_loginPhone: typeof loginPhone;
|
|
453
532
|
declare const api_loginSim: typeof loginSim;
|
|
454
533
|
declare const api_queryUserInfo: typeof queryUserInfo;
|
|
534
|
+
declare const api_removeSongFromMyList: typeof removeSongFromMyList;
|
|
455
535
|
declare const api_removeUserCollect: typeof removeUserCollect;
|
|
456
536
|
declare const api_removeUserMyList: typeof removeUserMyList;
|
|
457
537
|
declare const api_searchAlbum: typeof searchAlbum;
|
|
@@ -465,7 +545,7 @@ declare const api_searchSong: typeof searchSong;
|
|
|
465
545
|
declare const api_searchSuggest: typeof searchSuggest;
|
|
466
546
|
declare const api_searchTicket: typeof searchTicket;
|
|
467
547
|
declare namespace api {
|
|
468
|
-
export { api_YDRZ as YDRZ, api_addUserCollect as addUserCollect, api_addUserMyList as addUserMyList, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_dislikeSong as dislikeSong, api_editUserMyList as editUserMyList, 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,
|
|
548
|
+
export { api_YDRZ as YDRZ, api_addSongToMyList as addSongToMyList, api_addUserCollect as addUserCollect, api_addUserMyList as addUserMyList, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_dislikeSong as dislikeSong, api_editUserMyList as editUserMyList, api_getAlbumInfo as getAlbumInfo, api_getAlbumSong as getAlbumSong, api_getColumnInfo as getColumnInfo, api_getComment as getComment, api_getLyric as getLyric, api_getMVRecommend as getMVRecommend, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNewCDList as getNewCDList, api_getNewSongList as getNewSongList, 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_getPlaylistSquarePage as getPlaylistSquarePage, api_getRadioRecommend as getRadioRecommend, api_getRadioRecommendAll as getRadioRecommendAll, api_getRadioSong as getRadioSong, 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_getUserCollectList as getUserCollectList, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getVersion as getVersion, api_getVrbtOpNum as getVrbtOpNum, api_getVrbtUrl as getVrbtUrl, api_likeSong as likeSong, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_queryUserInfo as queryUserInfo, api_removeSongFromMyList as removeSongFromMyList, api_removeUserCollect as removeUserCollect, api_removeUserMyList as removeUserMyList, 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 };
|
|
469
549
|
}
|
|
470
550
|
|
|
471
551
|
declare const ua: string[];
|
|
@@ -511,4 +591,4 @@ declare function createClient(): typeof api;
|
|
|
511
591
|
/** 客户端类型 */
|
|
512
592
|
type MiguClient = ReturnType<typeof createClient>;
|
|
513
593
|
|
|
514
|
-
export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, addUserCollect, addUserMyList, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getComment, getDeviceId, getLyric, getMVRecommend, getMvHls, getMvInfo, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong,
|
|
594
|
+
export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, addSongToMyList, addUserCollect, addUserMyList, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getColumnInfo, getComment, getDeviceId, getLyric, getMVRecommend, getMvHls, getMvInfo, getNewCDList, getNewSongList, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPlaylistSquarePage, getPublicKey, getRadioRecommend, getRadioRecommendAll, getRadioSong, getRankIndex, getRankInfo, getRecommendPlaylist, getResourceInfo, getSVideoInfo, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollectList, getUserHomePage, getUserMyList, getVersion, getVrbtOpNum, getVrbtUrl, likeSong, loginNP, loginOneClick, loginPhone, loginSim, api as modules, queryUserInfo, randomUA, removeSongFromMyList, removeUserCollect, removeUserMyList, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, ua };
|
package/dist/index.d.ts
CHANGED
|
@@ -61,7 +61,11 @@ size?: number, hotCommentStart?: number) => Promise<any>;
|
|
|
61
61
|
*/
|
|
62
62
|
declare const getResourceInfo: (resourceIds?: string, copyrightIds?: string, resourceType?: number) => Promise<any>;
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
/** 检查是否可以播放
|
|
65
|
+
* @param contentIds 内容ID列表,逗号分隔
|
|
66
|
+
* @return
|
|
67
|
+
*/
|
|
68
|
+
declare const checkCanListen: (contentIds: string) => Promise<any>;
|
|
65
69
|
|
|
66
70
|
declare const getOpNum: (ids: string) => Promise<any>;
|
|
67
71
|
|
|
@@ -231,7 +235,7 @@ declare const loginPhone: {
|
|
|
231
235
|
*/
|
|
232
236
|
declare const getMVRecommend: (mvContentId: string, page?: number) => Promise<any>;
|
|
233
237
|
|
|
234
|
-
declare const
|
|
238
|
+
declare const getPlaylistSquarePage: () => Promise<any>;
|
|
235
239
|
|
|
236
240
|
declare const searchLrc: (text: string, page?: number) => Promise<any>;
|
|
237
241
|
|
|
@@ -373,27 +377,98 @@ declare const dislikeSong: (pacmtoken: string, contentId: string) => Promise<{
|
|
|
373
377
|
newPacmToken: string;
|
|
374
378
|
}>;
|
|
375
379
|
|
|
380
|
+
/**
|
|
381
|
+
* 编辑播放列表
|
|
382
|
+
* @param pacmtoken 用户token
|
|
383
|
+
* @param title 播放列表名称
|
|
384
|
+
* @param playlistId 播放列表id
|
|
385
|
+
* @returns
|
|
386
|
+
*/
|
|
376
387
|
declare const editUserMyList: (pacmtoken: string, title: string, playlistId: string) => Promise<{
|
|
377
388
|
data: any;
|
|
378
389
|
newPacmToken: string;
|
|
379
390
|
}>;
|
|
380
391
|
|
|
392
|
+
/**
|
|
393
|
+
* 创建播放列表
|
|
394
|
+
* @param pacmtoken 用户token
|
|
395
|
+
* @param title 播放列表名称
|
|
396
|
+
* @returns
|
|
397
|
+
*/
|
|
381
398
|
declare const addUserMyList: (pacmtoken: string, title: string) => Promise<{
|
|
382
399
|
data: any;
|
|
383
400
|
newPacmToken: string;
|
|
384
401
|
}>;
|
|
385
402
|
|
|
403
|
+
/**
|
|
404
|
+
* 删除播放列表
|
|
405
|
+
* @param pacmtoken 用户token
|
|
406
|
+
* @param playlistId 播放列表id
|
|
407
|
+
* @returns
|
|
408
|
+
*/
|
|
386
409
|
declare const removeUserMyList: (pacmtoken: string, playlistId: string) => Promise<{
|
|
387
410
|
data: any;
|
|
388
411
|
newPacmToken: string;
|
|
389
412
|
}>;
|
|
390
413
|
|
|
414
|
+
/**
|
|
415
|
+
* 获取电台歌曲
|
|
416
|
+
* @param radioId 电台ID
|
|
417
|
+
* @param page 页码
|
|
418
|
+
* @returns
|
|
419
|
+
*/
|
|
420
|
+
declare const getRadioSong: (radioId: string, page?: number) => Promise<any>;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* 新碟上架
|
|
424
|
+
* @returns
|
|
425
|
+
*/
|
|
426
|
+
declare const getNewCDList: () => Promise<any>;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* 新歌速递
|
|
430
|
+
* @returns
|
|
431
|
+
*/
|
|
432
|
+
declare const getNewSongList: () => Promise<any>;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* 栏目内容
|
|
436
|
+
* @param columnId 栏目ID
|
|
437
|
+
* @returns
|
|
438
|
+
*/
|
|
439
|
+
declare const getColumnInfo: (columnId: string) => Promise<any>;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* 添加歌曲到播放列表
|
|
443
|
+
* @param pacmtoken
|
|
444
|
+
* @param playlistId 播放列表id
|
|
445
|
+
* @param contentIds 歌曲id列表,逗号分隔
|
|
446
|
+
* @returns
|
|
447
|
+
*/
|
|
448
|
+
declare const addSongToMyList: (pacmtoken: string, playlistId: string, contentIds: string) => Promise<{
|
|
449
|
+
data: any;
|
|
450
|
+
newPacmToken: string;
|
|
451
|
+
}>;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* 删除播放列表中的歌曲
|
|
455
|
+
* @param pacmtoken 用户token
|
|
456
|
+
* @param playlistId 播放列表id
|
|
457
|
+
* @param contentId 单个歌曲id
|
|
458
|
+
* @returns
|
|
459
|
+
*/
|
|
460
|
+
declare const removeSongFromMyList: (pacmtoken: string, playlistId: string, contentId: string) => Promise<{
|
|
461
|
+
data: any;
|
|
462
|
+
newPacmToken: string;
|
|
463
|
+
}>;
|
|
464
|
+
|
|
391
465
|
/**
|
|
392
466
|
* modules 子目录统一入口
|
|
393
467
|
* 汇总导出所有 API 函数
|
|
394
468
|
*/
|
|
395
469
|
|
|
396
470
|
declare const api_YDRZ: typeof YDRZ;
|
|
471
|
+
declare const api_addSongToMyList: typeof addSongToMyList;
|
|
397
472
|
declare const api_addUserCollect: typeof addUserCollect;
|
|
398
473
|
declare const api_addUserMyList: typeof addUserMyList;
|
|
399
474
|
declare const api_checkCanListen: typeof checkCanListen;
|
|
@@ -402,20 +477,24 @@ declare const api_dislikeSong: typeof dislikeSong;
|
|
|
402
477
|
declare const api_editUserMyList: typeof editUserMyList;
|
|
403
478
|
declare const api_getAlbumInfo: typeof getAlbumInfo;
|
|
404
479
|
declare const api_getAlbumSong: typeof getAlbumSong;
|
|
480
|
+
declare const api_getColumnInfo: typeof getColumnInfo;
|
|
405
481
|
declare const api_getComment: typeof getComment;
|
|
406
482
|
declare const api_getLyric: typeof getLyric;
|
|
407
483
|
declare const api_getMVRecommend: typeof getMVRecommend;
|
|
408
484
|
declare const api_getMvHls: typeof getMvHls;
|
|
409
485
|
declare const api_getMvInfo: typeof getMvInfo;
|
|
486
|
+
declare const api_getNewCDList: typeof getNewCDList;
|
|
487
|
+
declare const api_getNewSongList: typeof getNewSongList;
|
|
410
488
|
declare const api_getNinanByDate: typeof getNinanByDate;
|
|
411
489
|
declare const api_getNinanSong: typeof getNinanSong;
|
|
412
490
|
declare const api_getOpNum: typeof getOpNum;
|
|
413
491
|
declare const api_getPacmToken: typeof getPacmToken;
|
|
414
492
|
declare const api_getPlaylistInfo: typeof getPlaylistInfo;
|
|
415
493
|
declare const api_getPlaylistSong: typeof getPlaylistSong;
|
|
416
|
-
declare const
|
|
494
|
+
declare const api_getPlaylistSquarePage: typeof getPlaylistSquarePage;
|
|
417
495
|
declare const api_getRadioRecommend: typeof getRadioRecommend;
|
|
418
496
|
declare const api_getRadioRecommendAll: typeof getRadioRecommendAll;
|
|
497
|
+
declare const api_getRadioSong: typeof getRadioSong;
|
|
419
498
|
declare const api_getRankIndex: typeof getRankIndex;
|
|
420
499
|
declare const api_getRankInfo: typeof getRankInfo;
|
|
421
500
|
declare const api_getRecommendPlaylist: typeof getRecommendPlaylist;
|
|
@@ -452,6 +531,7 @@ declare const api_loginOneClick: typeof loginOneClick;
|
|
|
452
531
|
declare const api_loginPhone: typeof loginPhone;
|
|
453
532
|
declare const api_loginSim: typeof loginSim;
|
|
454
533
|
declare const api_queryUserInfo: typeof queryUserInfo;
|
|
534
|
+
declare const api_removeSongFromMyList: typeof removeSongFromMyList;
|
|
455
535
|
declare const api_removeUserCollect: typeof removeUserCollect;
|
|
456
536
|
declare const api_removeUserMyList: typeof removeUserMyList;
|
|
457
537
|
declare const api_searchAlbum: typeof searchAlbum;
|
|
@@ -465,7 +545,7 @@ declare const api_searchSong: typeof searchSong;
|
|
|
465
545
|
declare const api_searchSuggest: typeof searchSuggest;
|
|
466
546
|
declare const api_searchTicket: typeof searchTicket;
|
|
467
547
|
declare namespace api {
|
|
468
|
-
export { api_YDRZ as YDRZ, api_addUserCollect as addUserCollect, api_addUserMyList as addUserMyList, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_dislikeSong as dislikeSong, api_editUserMyList as editUserMyList, 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,
|
|
548
|
+
export { api_YDRZ as YDRZ, api_addSongToMyList as addSongToMyList, api_addUserCollect as addUserCollect, api_addUserMyList as addUserMyList, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_dislikeSong as dislikeSong, api_editUserMyList as editUserMyList, api_getAlbumInfo as getAlbumInfo, api_getAlbumSong as getAlbumSong, api_getColumnInfo as getColumnInfo, api_getComment as getComment, api_getLyric as getLyric, api_getMVRecommend as getMVRecommend, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNewCDList as getNewCDList, api_getNewSongList as getNewSongList, 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_getPlaylistSquarePage as getPlaylistSquarePage, api_getRadioRecommend as getRadioRecommend, api_getRadioRecommendAll as getRadioRecommendAll, api_getRadioSong as getRadioSong, 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_getUserCollectList as getUserCollectList, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getVersion as getVersion, api_getVrbtOpNum as getVrbtOpNum, api_getVrbtUrl as getVrbtUrl, api_likeSong as likeSong, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_queryUserInfo as queryUserInfo, api_removeSongFromMyList as removeSongFromMyList, api_removeUserCollect as removeUserCollect, api_removeUserMyList as removeUserMyList, 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 };
|
|
469
549
|
}
|
|
470
550
|
|
|
471
551
|
declare const ua: string[];
|
|
@@ -511,4 +591,4 @@ declare function createClient(): typeof api;
|
|
|
511
591
|
/** 客户端类型 */
|
|
512
592
|
type MiguClient = ReturnType<typeof createClient>;
|
|
513
593
|
|
|
514
|
-
export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, addUserCollect, addUserMyList, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getComment, getDeviceId, getLyric, getMVRecommend, getMvHls, getMvInfo, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong,
|
|
594
|
+
export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, addSongToMyList, addUserCollect, addUserMyList, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getColumnInfo, getComment, getDeviceId, getLyric, getMVRecommend, getMvHls, getMvInfo, getNewCDList, getNewSongList, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPlaylistSquarePage, getPublicKey, getRadioRecommend, getRadioRecommendAll, getRadioSong, getRankIndex, getRankInfo, getRecommendPlaylist, getResourceInfo, getSVideoInfo, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollectList, getUserHomePage, getUserMyList, getVersion, getVrbtOpNum, getVrbtUrl, likeSong, loginNP, loginOneClick, loginPhone, loginSim, api as modules, queryUserInfo, randomUA, removeSongFromMyList, removeUserCollect, removeUserMyList, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, ua };
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
var modules_exports = {};
|
|
9
9
|
__export(modules_exports, {
|
|
10
10
|
YDRZ: () => YDRZ,
|
|
11
|
+
addSongToMyList: () => addSongToMyList,
|
|
11
12
|
addUserCollect: () => addUserCollect,
|
|
12
13
|
addUserMyList: () => addUserMyList,
|
|
13
14
|
checkCanListen: () => checkCanListen,
|
|
@@ -16,20 +17,24 @@ __export(modules_exports, {
|
|
|
16
17
|
editUserMyList: () => editUserMyList,
|
|
17
18
|
getAlbumInfo: () => getAlbumInfo,
|
|
18
19
|
getAlbumSong: () => getAlbumSong,
|
|
20
|
+
getColumnInfo: () => getColumnInfo,
|
|
19
21
|
getComment: () => getComment,
|
|
20
22
|
getLyric: () => getLyric,
|
|
21
23
|
getMVRecommend: () => getMVRecommend,
|
|
22
24
|
getMvHls: () => getMvHls,
|
|
23
25
|
getMvInfo: () => getMvInfo,
|
|
26
|
+
getNewCDList: () => getNewCDList,
|
|
27
|
+
getNewSongList: () => getNewSongList,
|
|
24
28
|
getNinanByDate: () => getNinanByDate,
|
|
25
29
|
getNinanSong: () => getNinanSong,
|
|
26
30
|
getOpNum: () => getOpNum,
|
|
27
31
|
getPacmToken: () => getPacmToken,
|
|
28
32
|
getPlaylistInfo: () => getPlaylistInfo,
|
|
29
33
|
getPlaylistSong: () => getPlaylistSong,
|
|
30
|
-
|
|
34
|
+
getPlaylistSquarePage: () => getPlaylistSquarePage,
|
|
31
35
|
getRadioRecommend: () => getRadioRecommend,
|
|
32
36
|
getRadioRecommendAll: () => getRadioRecommendAll,
|
|
37
|
+
getRadioSong: () => getRadioSong,
|
|
33
38
|
getRankIndex: () => getRankIndex,
|
|
34
39
|
getRankInfo: () => getRankInfo,
|
|
35
40
|
getRecommendPlaylist: () => getRecommendPlaylist,
|
|
@@ -66,6 +71,7 @@ __export(modules_exports, {
|
|
|
66
71
|
loginPhone: () => loginPhone,
|
|
67
72
|
loginSim: () => loginSim,
|
|
68
73
|
queryUserInfo: () => queryUserInfo,
|
|
74
|
+
removeSongFromMyList: () => removeSongFromMyList,
|
|
69
75
|
removeUserCollect: () => removeUserCollect,
|
|
70
76
|
removeUserMyList: () => removeUserMyList,
|
|
71
77
|
searchAlbum: () => searchAlbum,
|
|
@@ -288,15 +294,19 @@ var getResourceInfo = async (resourceIds = "", copyrightIds = "", resourceType =
|
|
|
288
294
|
};
|
|
289
295
|
|
|
290
296
|
// src/modules/can-listen.ts
|
|
291
|
-
var checkCanListen = async (
|
|
297
|
+
var checkCanListen = async (contentIds) => {
|
|
292
298
|
return await h5fetch(
|
|
293
299
|
`https://app.c.nf.migu.cn/strategy/pc/can-listen/v1.0`,
|
|
294
300
|
{
|
|
295
301
|
method: "post",
|
|
296
302
|
headers: {
|
|
297
|
-
"Content-Type": "application/json"
|
|
303
|
+
"Content-Type": "application/json",
|
|
304
|
+
"channel": "014X031"
|
|
305
|
+
// music.migu.cn
|
|
298
306
|
},
|
|
299
|
-
body: JSON.stringify(
|
|
307
|
+
body: JSON.stringify({
|
|
308
|
+
"contentIds": contentIds
|
|
309
|
+
})
|
|
300
310
|
}
|
|
301
311
|
);
|
|
302
312
|
};
|
|
@@ -1109,8 +1119,8 @@ var getMVRecommend = async (mvContentId, page = 1) => {
|
|
|
1109
1119
|
return await h5fetch(`https://c.musicapp.migu.cn/MIGUM3.0/v3.0/content/recommend-mv?resourceId=${mvContentId}&pageNumber=${page}&resourceType=D`);
|
|
1110
1120
|
};
|
|
1111
1121
|
|
|
1112
|
-
// src/modules/
|
|
1113
|
-
var
|
|
1122
|
+
// src/modules/playlist_square_page.ts
|
|
1123
|
+
var getPlaylistSquarePage = async () => {
|
|
1114
1124
|
return await h5fetch(`https://app.c.nf.migu.cn/pc/bmw/page-data/playlist-square-recommend/v1.0?templateVersion=2`);
|
|
1115
1125
|
};
|
|
1116
1126
|
|
|
@@ -1355,6 +1365,68 @@ var removeUserMyList = async (pacmtoken, playlistId) => {
|
|
|
1355
1365
|
return { data: res.data, newPacmToken };
|
|
1356
1366
|
};
|
|
1357
1367
|
|
|
1368
|
+
// src/modules/radio_song.ts
|
|
1369
|
+
var getRadioSong = async (radioId, page = 1) => {
|
|
1370
|
+
return await h5fetch(`https://app.c.nf.migu.cn/pc/column/music-radio/scene/song/v3.0?remain=0&pageNo=${page}&actionId=1&radioId=${radioId}`);
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
// src/modules/column_newCD.ts
|
|
1374
|
+
var getNewCDList = async () => {
|
|
1375
|
+
return await h5fetch(`https://app.c.nf.migu.cn/pc/v1.0/template/get-new-cd-list-header`);
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
// src/modules/column_newSong.ts
|
|
1379
|
+
var getNewSongList = async () => {
|
|
1380
|
+
return await h5fetch(`https://app.c.nf.migu.cn/pc/v1.0/template/get-new-music-list-header`);
|
|
1381
|
+
};
|
|
1382
|
+
|
|
1383
|
+
// src/modules/column_info.ts
|
|
1384
|
+
var getColumnInfo = async (columnId) => {
|
|
1385
|
+
return await h5fetch(`https://app.c.nf.migu.cn/column/column-info/h5/v2.0?columnId=${columnId}`);
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1388
|
+
// src/modules/user_myList_add_song.ts
|
|
1389
|
+
import axios24 from "axios";
|
|
1390
|
+
var addSongToMyList = async (pacmtoken, playlistId, contentIds) => {
|
|
1391
|
+
const body = {
|
|
1392
|
+
"id": playlistId,
|
|
1393
|
+
"contentIds": contentIds.split(",")
|
|
1394
|
+
};
|
|
1395
|
+
const res = await axios24.post(
|
|
1396
|
+
`https://app.c.nf.migu.cn/pc/user/api/add-music-list-song/v1.0`,
|
|
1397
|
+
body,
|
|
1398
|
+
{
|
|
1399
|
+
headers: {
|
|
1400
|
+
"Cookie": `pacmtoken=${pacmtoken}`
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
);
|
|
1404
|
+
const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
|
|
1405
|
+
return { data: res.data, newPacmToken };
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
// src/modules/user_myList_remove_song.ts
|
|
1409
|
+
import axios25 from "axios";
|
|
1410
|
+
var removeSongFromMyList = async (pacmtoken, playlistId, contentId) => {
|
|
1411
|
+
const body = {
|
|
1412
|
+
"channel": "23",
|
|
1413
|
+
"songflag": "2",
|
|
1414
|
+
"contentId": contentId,
|
|
1415
|
+
"id": playlistId
|
|
1416
|
+
};
|
|
1417
|
+
const res = await axios25.post(
|
|
1418
|
+
`https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`,
|
|
1419
|
+
body,
|
|
1420
|
+
{
|
|
1421
|
+
headers: {
|
|
1422
|
+
"Cookie": `pacmtoken=${pacmtoken}`
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
);
|
|
1426
|
+
const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
|
|
1427
|
+
return { data: res.data, newPacmToken };
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1358
1430
|
// src/utils/index.ts
|
|
1359
1431
|
var utils_exports = {};
|
|
1360
1432
|
__export(utils_exports, {
|
|
@@ -1370,12 +1442,11 @@ __export(utils_exports, {
|
|
|
1370
1442
|
var ua = [
|
|
1371
1443
|
"Mozilla/5.0 (Linux; Android 9; Redmi Note 7 Build/PKQ1.180904.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.121 Mobile Safari/537.36",
|
|
1372
1444
|
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36 Edg/149.0.0.0",
|
|
1373
|
-
"Mozilla/5.0 (Linux; Android 9; Redmi Note 7 Build/PKQ1.180904.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.136 Mobile Safari/537.36",
|
|
1374
1445
|
"Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_1 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B150 /sa-sdk-ios/sensors-verify/sc.baertt.com?production ",
|
|
1375
1446
|
"Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/534.31 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/534.31"
|
|
1376
1447
|
];
|
|
1377
1448
|
var randomUA = () => {
|
|
1378
|
-
const i = Math.floor(Math.random() *
|
|
1449
|
+
const i = Math.floor(Math.random() * ua.length);
|
|
1379
1450
|
return ua[i];
|
|
1380
1451
|
};
|
|
1381
1452
|
|
|
@@ -1388,6 +1459,7 @@ export {
|
|
|
1388
1459
|
RSAKey,
|
|
1389
1460
|
URLParams,
|
|
1390
1461
|
YDRZ,
|
|
1462
|
+
addSongToMyList,
|
|
1391
1463
|
addUserCollect,
|
|
1392
1464
|
addUserMyList,
|
|
1393
1465
|
checkCanListen,
|
|
@@ -1397,22 +1469,26 @@ export {
|
|
|
1397
1469
|
editUserMyList,
|
|
1398
1470
|
getAlbumInfo,
|
|
1399
1471
|
getAlbumSong,
|
|
1472
|
+
getColumnInfo,
|
|
1400
1473
|
getComment,
|
|
1401
1474
|
getDeviceId,
|
|
1402
1475
|
getLyric,
|
|
1403
1476
|
getMVRecommend,
|
|
1404
1477
|
getMvHls,
|
|
1405
1478
|
getMvInfo,
|
|
1479
|
+
getNewCDList,
|
|
1480
|
+
getNewSongList,
|
|
1406
1481
|
getNinanByDate,
|
|
1407
1482
|
getNinanSong,
|
|
1408
1483
|
getOpNum,
|
|
1409
1484
|
getPacmToken,
|
|
1410
1485
|
getPlaylistInfo,
|
|
1411
1486
|
getPlaylistSong,
|
|
1412
|
-
|
|
1487
|
+
getPlaylistSquarePage,
|
|
1413
1488
|
getPublicKey,
|
|
1414
1489
|
getRadioRecommend,
|
|
1415
1490
|
getRadioRecommendAll,
|
|
1491
|
+
getRadioSong,
|
|
1416
1492
|
getRankIndex,
|
|
1417
1493
|
getRankInfo,
|
|
1418
1494
|
getRecommendPlaylist,
|
|
@@ -1451,6 +1527,7 @@ export {
|
|
|
1451
1527
|
modules_exports as modules,
|
|
1452
1528
|
queryUserInfo,
|
|
1453
1529
|
randomUA,
|
|
1530
|
+
removeSongFromMyList,
|
|
1454
1531
|
removeUserCollect,
|
|
1455
1532
|
removeUserMyList,
|
|
1456
1533
|
searchAlbum,
|