migu-api-enhanced 2.18.0 → 2.19.1
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/README.md +5 -5
- package/dist/index.cjs +184 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -40
- package/dist/index.d.ts +56 -40
- package/dist/index.js +179 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -409,40 +409,16 @@ declare const getLyric: (contentId: string) => Promise<{
|
|
|
409
409
|
data?: undefined;
|
|
410
410
|
}>;
|
|
411
411
|
|
|
412
|
-
declare namespace AddUserCollect {
|
|
413
|
-
interface Playlist {
|
|
414
|
-
type: 'playlist';
|
|
415
|
-
title: string;
|
|
416
|
-
playlistId: string;
|
|
417
|
-
}
|
|
418
|
-
interface Comment {
|
|
419
|
-
type: 'comment';
|
|
420
|
-
userId: string;
|
|
421
|
-
commentId: string;
|
|
422
|
-
}
|
|
423
|
-
type params = Playlist | Comment;
|
|
424
|
-
}
|
|
425
|
-
declare namespace RemoveUserCollect {
|
|
426
|
-
interface Playlist {
|
|
427
|
-
type: 'playlist';
|
|
428
|
-
playlistId: string;
|
|
429
|
-
}
|
|
430
|
-
interface Comment {
|
|
431
|
-
type: 'comment';
|
|
432
|
-
userId: string;
|
|
433
|
-
commentId: string;
|
|
434
|
-
}
|
|
435
|
-
type params = Playlist | Comment;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
412
|
/**
|
|
439
413
|
* 添加用户收藏
|
|
440
414
|
* @param pacmtoken 用户pacmtoken
|
|
441
|
-
* @param
|
|
442
|
-
* @param
|
|
415
|
+
* @param type 收藏类型 playlist:歌单 comment:评论 album:专辑
|
|
416
|
+
* @param contentId 歌单id / 评论id / 专辑id
|
|
417
|
+
* @param title 歌单标题 / 专辑标题 (type=playlist或album时必填)
|
|
418
|
+
* @param userId 用户id (type=comment时必填)
|
|
443
419
|
* @returns 添加结果和新的pacmtoken
|
|
444
420
|
*/
|
|
445
|
-
declare const addUserCollect: (pacmtoken: string,
|
|
421
|
+
declare const addUserCollect: (pacmtoken: string, type: string, contentId: string, title?: string, userId?: string) => Promise<{
|
|
446
422
|
success: boolean;
|
|
447
423
|
err: string;
|
|
448
424
|
data?: undefined;
|
|
@@ -457,14 +433,12 @@ declare const addUserCollect: (pacmtoken: string, params: AddUserCollect.params)
|
|
|
457
433
|
/**
|
|
458
434
|
* 删除用户收藏
|
|
459
435
|
* @param pacmtoken 用户pacmtoken
|
|
460
|
-
* @param
|
|
461
|
-
* @param
|
|
462
|
-
* @param
|
|
463
|
-
* @param params.userId 用户id
|
|
464
|
-
* @param params.commentId 评论id
|
|
436
|
+
* @param type 收藏类型 playlist:歌单 comment:评论 album:专辑
|
|
437
|
+
* @param contentId 歌单id / 评论id / 专辑id
|
|
438
|
+
* @param userId 用户id (type=comment时必填)
|
|
465
439
|
* @returns 删除结果和新的pacmtoken
|
|
466
440
|
*/
|
|
467
|
-
declare const removeUserCollect: (pacmtoken: string,
|
|
441
|
+
declare const removeUserCollect: (pacmtoken: string, type: string, contentId: string, userId?: string) => Promise<{
|
|
468
442
|
success: boolean;
|
|
469
443
|
err: string;
|
|
470
444
|
data?: undefined;
|
|
@@ -825,8 +799,8 @@ declare const logout: (pacmtoken: string) => Promise<any>;
|
|
|
825
799
|
|
|
826
800
|
/**
|
|
827
801
|
* 分享视频
|
|
828
|
-
* @param resourceType 资源类型 6000:短视频 D:MV
|
|
829
|
-
* @param contentId
|
|
802
|
+
* @param resourceType 资源类型 6000:短视频 D:MV M:视频彩铃
|
|
803
|
+
* @param contentId 短视频id / MVid / vrbtId
|
|
830
804
|
* @param userId 视频用户id (可选)
|
|
831
805
|
* @returns 分享信息 (url)
|
|
832
806
|
*/
|
|
@@ -843,6 +817,43 @@ declare const shareVideo: (resourceType: string, contentId: string, userId?: str
|
|
|
843
817
|
*/
|
|
844
818
|
declare const shareCommon: (resourceType: string, contentId: string, contentName: string, targetUserName?: string, copyrightId?: string) => Promise<any>;
|
|
845
819
|
|
|
820
|
+
/**
|
|
821
|
+
* 我的听书记录
|
|
822
|
+
* @param pacmtoken 用户token
|
|
823
|
+
* @returns 用户听书记录信息和新的pacmtoken
|
|
824
|
+
*/
|
|
825
|
+
declare const getUserAudioBook: (pacmtoken: string, recentListenNum?: number, recommendNum?: number) => Promise<{
|
|
826
|
+
data: any;
|
|
827
|
+
newPacmToken: string;
|
|
828
|
+
}>;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* 听歌排行
|
|
832
|
+
* @param pacmtoken 用户token
|
|
833
|
+
* @param type 排行类型: week:最近一周 year:过去三年
|
|
834
|
+
* @returns 听歌排行列表,包含新pacmtoken
|
|
835
|
+
*/
|
|
836
|
+
declare const getListenRank: (pacmtoken: string, type: string) => Promise<{
|
|
837
|
+
data: any;
|
|
838
|
+
newPacmToken: string;
|
|
839
|
+
}>;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* 获取云盘音乐播放地址
|
|
843
|
+
* @param pacmtoken 用户token
|
|
844
|
+
* @param contentId 云盘音乐contentId
|
|
845
|
+
* @param toneFlag 音乐质量 默认PQ
|
|
846
|
+
* @returns 地址和新的pacmtoken
|
|
847
|
+
*/
|
|
848
|
+
declare const getCloudUrl: (pacmtoken: string, contentId: string, toneFlag?: string) => Promise<{
|
|
849
|
+
data: any;
|
|
850
|
+
newPacmToken: string;
|
|
851
|
+
}>;
|
|
852
|
+
|
|
853
|
+
declare const getDLUrlV1: (songId: string, toneFlag?: string) => Promise<any>;
|
|
854
|
+
|
|
855
|
+
declare const getUrlM2: (contentId: string, toneFlag?: string, copyrightId?: string, songId?: string, albumId?: string) => Promise<any>;
|
|
856
|
+
|
|
846
857
|
/**
|
|
847
858
|
* modules 子目录统一入口
|
|
848
859
|
* 汇总导出所有 API 函数
|
|
@@ -859,6 +870,7 @@ declare const api_dislikeSong: typeof dislikeSong;
|
|
|
859
870
|
declare const api_editUserMyList: typeof editUserMyList;
|
|
860
871
|
declare const api_getAlbumInfo: typeof getAlbumInfo;
|
|
861
872
|
declare const api_getAlbumSong: typeof getAlbumSong;
|
|
873
|
+
declare const api_getCloudUrl: typeof getCloudUrl;
|
|
862
874
|
declare const api_getColumnInfo: typeof getColumnInfo;
|
|
863
875
|
declare const api_getComment: typeof getComment;
|
|
864
876
|
declare const api_getConcertComment: typeof getConcertComment;
|
|
@@ -866,9 +878,11 @@ declare const api_getConcertDetail: typeof getConcertDetail;
|
|
|
866
878
|
declare const api_getConcertInfo: typeof getConcertInfo;
|
|
867
879
|
declare const api_getConcertRecommendMv: typeof getConcertRecommendMv;
|
|
868
880
|
declare const api_getConcertUrl: typeof getConcertUrl;
|
|
881
|
+
declare const api_getDLUrlV1: typeof getDLUrlV1;
|
|
869
882
|
declare const api_getFollowerList: typeof getFollowerList;
|
|
870
883
|
declare const api_getFollowingList: typeof getFollowingList;
|
|
871
884
|
declare const api_getFollowingVra: typeof getFollowingVra;
|
|
885
|
+
declare const api_getListenRank: typeof getListenRank;
|
|
872
886
|
declare const api_getLyric: typeof getLyric;
|
|
873
887
|
declare const api_getMVRecommend: typeof getMVRecommend;
|
|
874
888
|
declare const api_getMvBySong: typeof getMvBySong;
|
|
@@ -913,8 +927,10 @@ declare const api_getSingerSong: typeof getSingerSong;
|
|
|
913
927
|
declare const api_getTicketInfo: typeof getTicketInfo;
|
|
914
928
|
declare const api_getTodayRecommend: typeof getTodayRecommend;
|
|
915
929
|
declare const api_getUrlH5V24: typeof getUrlH5V24;
|
|
930
|
+
declare const api_getUrlM2: typeof getUrlM2;
|
|
916
931
|
declare const api_getUrlV1: typeof getUrlV1;
|
|
917
932
|
declare const api_getUrlV2: typeof getUrlV2;
|
|
933
|
+
declare const api_getUserAudioBook: typeof getUserAudioBook;
|
|
918
934
|
declare const api_getUserBadge: typeof getUserBadge;
|
|
919
935
|
declare const api_getUserCollectList: typeof getUserCollectList;
|
|
920
936
|
declare const api_getUserHeader: typeof getUserHeader;
|
|
@@ -952,7 +968,7 @@ declare const api_shareCommon: typeof shareCommon;
|
|
|
952
968
|
declare const api_shareVideo: typeof shareVideo;
|
|
953
969
|
declare const api_signNinan: typeof signNinan;
|
|
954
970
|
declare namespace api {
|
|
955
|
-
export { api_YDRZ as YDRZ, api_addFollower as addFollower, 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_getConcertComment as getConcertComment, api_getConcertDetail as getConcertDetail, api_getConcertInfo as getConcertInfo, api_getConcertRecommendMv as getConcertRecommendMv, api_getConcertUrl as getConcertUrl, api_getFollowerList as getFollowerList, api_getFollowingList as getFollowingList, api_getFollowingVra as getFollowingVra, api_getLyric as getLyric, api_getMVRecommend as getMVRecommend, api_getMvBySong as getMvBySong, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNewCDList as getNewCDList, api_getNewSongList as getNewSongList, api_getNinanByDate as getNinanByDate, api_getNinanSignInfo as getNinanSignInfo, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPageInfo as getPageInfo, api_getPageTab as getPageTab, 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_getRedirectUrl as getRedirectUrl, api_getResourceInfo as getResourceInfo, api_getSVideoInfo as getSVideoInfo, api_getSVideoRecommend as getSVideoRecommend, api_getSVideoSearchSuggest as getSVideoSearchSuggest, api_getSVideoUrl as getSVideoUrl, api_getSVideoUserContent as getSVideoUserContent, api_getSVideoUserInfo as getSVideoUserInfo, 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_getUserHeader as getUserHeader, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getUserSongPage as getUserSongPage, api_getVersion as getVersion, api_getVipPlaylist as getVipPlaylist, api_getVrbtOpNum as getVrbtOpNum, api_getVrbtUrl as getVrbtUrl, api_isFollowAuthor as isFollowAuthor, api_likeSong as likeSong, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_logout as logout, api_matchPlaylist as matchPlaylist, api_queryUserInfo as queryUserInfo, api_removeFollower as removeFollower, 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, api_shareCommon as shareCommon, api_shareVideo as shareVideo, api_signNinan as signNinan };
|
|
971
|
+
export { api_YDRZ as YDRZ, api_addFollower as addFollower, 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_getCloudUrl as getCloudUrl, api_getColumnInfo as getColumnInfo, api_getComment as getComment, api_getConcertComment as getConcertComment, api_getConcertDetail as getConcertDetail, api_getConcertInfo as getConcertInfo, api_getConcertRecommendMv as getConcertRecommendMv, api_getConcertUrl as getConcertUrl, api_getDLUrlV1 as getDLUrlV1, api_getFollowerList as getFollowerList, api_getFollowingList as getFollowingList, api_getFollowingVra as getFollowingVra, api_getListenRank as getListenRank, api_getLyric as getLyric, api_getMVRecommend as getMVRecommend, api_getMvBySong as getMvBySong, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNewCDList as getNewCDList, api_getNewSongList as getNewSongList, api_getNinanByDate as getNinanByDate, api_getNinanSignInfo as getNinanSignInfo, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPageInfo as getPageInfo, api_getPageTab as getPageTab, 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_getRedirectUrl as getRedirectUrl, api_getResourceInfo as getResourceInfo, api_getSVideoInfo as getSVideoInfo, api_getSVideoRecommend as getSVideoRecommend, api_getSVideoSearchSuggest as getSVideoSearchSuggest, api_getSVideoUrl as getSVideoUrl, api_getSVideoUserContent as getSVideoUserContent, api_getSVideoUserInfo as getSVideoUserInfo, 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_getUrlM2 as getUrlM2, api_getUrlV1 as getUrlV1, api_getUrlV2 as getUrlV2, api_getUserAudioBook as getUserAudioBook, api_getUserBadge as getUserBadge, api_getUserCollectList as getUserCollectList, api_getUserHeader as getUserHeader, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getUserSongPage as getUserSongPage, api_getVersion as getVersion, api_getVipPlaylist as getVipPlaylist, api_getVrbtOpNum as getVrbtOpNum, api_getVrbtUrl as getVrbtUrl, api_isFollowAuthor as isFollowAuthor, api_likeSong as likeSong, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_logout as logout, api_matchPlaylist as matchPlaylist, api_queryUserInfo as queryUserInfo, api_removeFollower as removeFollower, 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, api_shareCommon as shareCommon, api_shareVideo as shareVideo, api_signNinan as signNinan };
|
|
956
972
|
}
|
|
957
973
|
|
|
958
974
|
declare function getDeviceId(a?: number, b?: number): string;
|
|
@@ -990,7 +1006,7 @@ declare const toneFormat: {
|
|
|
990
1006
|
};
|
|
991
1007
|
declare function isQuality(quality: string | undefined): quality is Quality;
|
|
992
1008
|
declare function getQuality(url: string): Quality | '';
|
|
993
|
-
declare function changeQuality(url: string, quality: string, originalQuality?: string): string;
|
|
1009
|
+
declare function changeQuality(url: string, quality: string, originalQuality?: string, splitQuery?: boolean): string;
|
|
994
1010
|
|
|
995
1011
|
declare const getResourceId: (name: string) => "" | "2" | "2021" | "3002" | "2003" | "2002" | "2016" | "6000" | "D" | "M";
|
|
996
1012
|
|
|
@@ -1028,4 +1044,4 @@ declare function createClient(): ExpandedApi<typeof api>;
|
|
|
1028
1044
|
/** 客户端类型 */
|
|
1029
1045
|
type MiguClient = ReturnType<typeof createClient>;
|
|
1030
1046
|
|
|
1031
|
-
export { type MiguClient, index as MiguUtils, type Quality, RSAKey, URLParams, YDRZ, addFollower, addSongToMyList, addUserCollect, addUserMyList, changeQuality, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getColumnInfo, getComment, getConcertComment, getConcertDetail, getConcertInfo, getConcertRecommendMv, getConcertUrl, getDeviceId, getFollowerList, getFollowingList, getFollowingVra, getLyric, getMVRecommend, getMvBySong, getMvHls, getMvInfo, getNewCDList, getNewSongList, getNinanByDate, getNinanSignInfo, getNinanSong, getOpNum, getPacmToken, getPageInfo, getPageTab, getPlaylistInfo, getPlaylistSong, getPlaylistSquarePage, getPublicKey, getQuality, getRadioRecommend, getRadioRecommendAll, getRadioSong, getRankIndex, getRankInfo, getRecommendPlaylist, getRedirectUrl, getResourceId, getResourceInfo, getSVideoInfo, getSVideoRecommend, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSVideoUserInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollectList, getUserHeader, getUserHomePage, getUserMyList, getUserSongPage, getVersion, getVipPlaylist, getVrbtOpNum, getVrbtUrl, isFollowAuthor, isQuality, likeSong, loginNP, loginOneClick, loginPhone, loginSim, logout, matchPlaylist, api as modules, qualityList, queryUserInfo, removeFollower, removeSongFromMyList, removeUserCollect, removeUserMyList, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, shareCommon, shareVideo, signNinan, toneFormat, toneUrl };
|
|
1047
|
+
export { type MiguClient, index as MiguUtils, type Quality, RSAKey, URLParams, YDRZ, addFollower, addSongToMyList, addUserCollect, addUserMyList, changeQuality, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getCloudUrl, getColumnInfo, getComment, getConcertComment, getConcertDetail, getConcertInfo, getConcertRecommendMv, getConcertUrl, getDLUrlV1, getDeviceId, getFollowerList, getFollowingList, getFollowingVra, getListenRank, getLyric, getMVRecommend, getMvBySong, getMvHls, getMvInfo, getNewCDList, getNewSongList, getNinanByDate, getNinanSignInfo, getNinanSong, getOpNum, getPacmToken, getPageInfo, getPageTab, getPlaylistInfo, getPlaylistSong, getPlaylistSquarePage, getPublicKey, getQuality, getRadioRecommend, getRadioRecommendAll, getRadioSong, getRankIndex, getRankInfo, getRecommendPlaylist, getRedirectUrl, getResourceId, getResourceInfo, getSVideoInfo, getSVideoRecommend, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSVideoUserInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlM2, getUrlV1, getUrlV2, getUserAudioBook, getUserBadge, getUserCollectList, getUserHeader, getUserHomePage, getUserMyList, getUserSongPage, getVersion, getVipPlaylist, getVrbtOpNum, getVrbtUrl, isFollowAuthor, isQuality, likeSong, loginNP, loginOneClick, loginPhone, loginSim, logout, matchPlaylist, api as modules, qualityList, queryUserInfo, removeFollower, removeSongFromMyList, removeUserCollect, removeUserMyList, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, shareCommon, shareVideo, signNinan, toneFormat, toneUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -409,40 +409,16 @@ declare const getLyric: (contentId: string) => Promise<{
|
|
|
409
409
|
data?: undefined;
|
|
410
410
|
}>;
|
|
411
411
|
|
|
412
|
-
declare namespace AddUserCollect {
|
|
413
|
-
interface Playlist {
|
|
414
|
-
type: 'playlist';
|
|
415
|
-
title: string;
|
|
416
|
-
playlistId: string;
|
|
417
|
-
}
|
|
418
|
-
interface Comment {
|
|
419
|
-
type: 'comment';
|
|
420
|
-
userId: string;
|
|
421
|
-
commentId: string;
|
|
422
|
-
}
|
|
423
|
-
type params = Playlist | Comment;
|
|
424
|
-
}
|
|
425
|
-
declare namespace RemoveUserCollect {
|
|
426
|
-
interface Playlist {
|
|
427
|
-
type: 'playlist';
|
|
428
|
-
playlistId: string;
|
|
429
|
-
}
|
|
430
|
-
interface Comment {
|
|
431
|
-
type: 'comment';
|
|
432
|
-
userId: string;
|
|
433
|
-
commentId: string;
|
|
434
|
-
}
|
|
435
|
-
type params = Playlist | Comment;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
412
|
/**
|
|
439
413
|
* 添加用户收藏
|
|
440
414
|
* @param pacmtoken 用户pacmtoken
|
|
441
|
-
* @param
|
|
442
|
-
* @param
|
|
415
|
+
* @param type 收藏类型 playlist:歌单 comment:评论 album:专辑
|
|
416
|
+
* @param contentId 歌单id / 评论id / 专辑id
|
|
417
|
+
* @param title 歌单标题 / 专辑标题 (type=playlist或album时必填)
|
|
418
|
+
* @param userId 用户id (type=comment时必填)
|
|
443
419
|
* @returns 添加结果和新的pacmtoken
|
|
444
420
|
*/
|
|
445
|
-
declare const addUserCollect: (pacmtoken: string,
|
|
421
|
+
declare const addUserCollect: (pacmtoken: string, type: string, contentId: string, title?: string, userId?: string) => Promise<{
|
|
446
422
|
success: boolean;
|
|
447
423
|
err: string;
|
|
448
424
|
data?: undefined;
|
|
@@ -457,14 +433,12 @@ declare const addUserCollect: (pacmtoken: string, params: AddUserCollect.params)
|
|
|
457
433
|
/**
|
|
458
434
|
* 删除用户收藏
|
|
459
435
|
* @param pacmtoken 用户pacmtoken
|
|
460
|
-
* @param
|
|
461
|
-
* @param
|
|
462
|
-
* @param
|
|
463
|
-
* @param params.userId 用户id
|
|
464
|
-
* @param params.commentId 评论id
|
|
436
|
+
* @param type 收藏类型 playlist:歌单 comment:评论 album:专辑
|
|
437
|
+
* @param contentId 歌单id / 评论id / 专辑id
|
|
438
|
+
* @param userId 用户id (type=comment时必填)
|
|
465
439
|
* @returns 删除结果和新的pacmtoken
|
|
466
440
|
*/
|
|
467
|
-
declare const removeUserCollect: (pacmtoken: string,
|
|
441
|
+
declare const removeUserCollect: (pacmtoken: string, type: string, contentId: string, userId?: string) => Promise<{
|
|
468
442
|
success: boolean;
|
|
469
443
|
err: string;
|
|
470
444
|
data?: undefined;
|
|
@@ -825,8 +799,8 @@ declare const logout: (pacmtoken: string) => Promise<any>;
|
|
|
825
799
|
|
|
826
800
|
/**
|
|
827
801
|
* 分享视频
|
|
828
|
-
* @param resourceType 资源类型 6000:短视频 D:MV
|
|
829
|
-
* @param contentId
|
|
802
|
+
* @param resourceType 资源类型 6000:短视频 D:MV M:视频彩铃
|
|
803
|
+
* @param contentId 短视频id / MVid / vrbtId
|
|
830
804
|
* @param userId 视频用户id (可选)
|
|
831
805
|
* @returns 分享信息 (url)
|
|
832
806
|
*/
|
|
@@ -843,6 +817,43 @@ declare const shareVideo: (resourceType: string, contentId: string, userId?: str
|
|
|
843
817
|
*/
|
|
844
818
|
declare const shareCommon: (resourceType: string, contentId: string, contentName: string, targetUserName?: string, copyrightId?: string) => Promise<any>;
|
|
845
819
|
|
|
820
|
+
/**
|
|
821
|
+
* 我的听书记录
|
|
822
|
+
* @param pacmtoken 用户token
|
|
823
|
+
* @returns 用户听书记录信息和新的pacmtoken
|
|
824
|
+
*/
|
|
825
|
+
declare const getUserAudioBook: (pacmtoken: string, recentListenNum?: number, recommendNum?: number) => Promise<{
|
|
826
|
+
data: any;
|
|
827
|
+
newPacmToken: string;
|
|
828
|
+
}>;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* 听歌排行
|
|
832
|
+
* @param pacmtoken 用户token
|
|
833
|
+
* @param type 排行类型: week:最近一周 year:过去三年
|
|
834
|
+
* @returns 听歌排行列表,包含新pacmtoken
|
|
835
|
+
*/
|
|
836
|
+
declare const getListenRank: (pacmtoken: string, type: string) => Promise<{
|
|
837
|
+
data: any;
|
|
838
|
+
newPacmToken: string;
|
|
839
|
+
}>;
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* 获取云盘音乐播放地址
|
|
843
|
+
* @param pacmtoken 用户token
|
|
844
|
+
* @param contentId 云盘音乐contentId
|
|
845
|
+
* @param toneFlag 音乐质量 默认PQ
|
|
846
|
+
* @returns 地址和新的pacmtoken
|
|
847
|
+
*/
|
|
848
|
+
declare const getCloudUrl: (pacmtoken: string, contentId: string, toneFlag?: string) => Promise<{
|
|
849
|
+
data: any;
|
|
850
|
+
newPacmToken: string;
|
|
851
|
+
}>;
|
|
852
|
+
|
|
853
|
+
declare const getDLUrlV1: (songId: string, toneFlag?: string) => Promise<any>;
|
|
854
|
+
|
|
855
|
+
declare const getUrlM2: (contentId: string, toneFlag?: string, copyrightId?: string, songId?: string, albumId?: string) => Promise<any>;
|
|
856
|
+
|
|
846
857
|
/**
|
|
847
858
|
* modules 子目录统一入口
|
|
848
859
|
* 汇总导出所有 API 函数
|
|
@@ -859,6 +870,7 @@ declare const api_dislikeSong: typeof dislikeSong;
|
|
|
859
870
|
declare const api_editUserMyList: typeof editUserMyList;
|
|
860
871
|
declare const api_getAlbumInfo: typeof getAlbumInfo;
|
|
861
872
|
declare const api_getAlbumSong: typeof getAlbumSong;
|
|
873
|
+
declare const api_getCloudUrl: typeof getCloudUrl;
|
|
862
874
|
declare const api_getColumnInfo: typeof getColumnInfo;
|
|
863
875
|
declare const api_getComment: typeof getComment;
|
|
864
876
|
declare const api_getConcertComment: typeof getConcertComment;
|
|
@@ -866,9 +878,11 @@ declare const api_getConcertDetail: typeof getConcertDetail;
|
|
|
866
878
|
declare const api_getConcertInfo: typeof getConcertInfo;
|
|
867
879
|
declare const api_getConcertRecommendMv: typeof getConcertRecommendMv;
|
|
868
880
|
declare const api_getConcertUrl: typeof getConcertUrl;
|
|
881
|
+
declare const api_getDLUrlV1: typeof getDLUrlV1;
|
|
869
882
|
declare const api_getFollowerList: typeof getFollowerList;
|
|
870
883
|
declare const api_getFollowingList: typeof getFollowingList;
|
|
871
884
|
declare const api_getFollowingVra: typeof getFollowingVra;
|
|
885
|
+
declare const api_getListenRank: typeof getListenRank;
|
|
872
886
|
declare const api_getLyric: typeof getLyric;
|
|
873
887
|
declare const api_getMVRecommend: typeof getMVRecommend;
|
|
874
888
|
declare const api_getMvBySong: typeof getMvBySong;
|
|
@@ -913,8 +927,10 @@ declare const api_getSingerSong: typeof getSingerSong;
|
|
|
913
927
|
declare const api_getTicketInfo: typeof getTicketInfo;
|
|
914
928
|
declare const api_getTodayRecommend: typeof getTodayRecommend;
|
|
915
929
|
declare const api_getUrlH5V24: typeof getUrlH5V24;
|
|
930
|
+
declare const api_getUrlM2: typeof getUrlM2;
|
|
916
931
|
declare const api_getUrlV1: typeof getUrlV1;
|
|
917
932
|
declare const api_getUrlV2: typeof getUrlV2;
|
|
933
|
+
declare const api_getUserAudioBook: typeof getUserAudioBook;
|
|
918
934
|
declare const api_getUserBadge: typeof getUserBadge;
|
|
919
935
|
declare const api_getUserCollectList: typeof getUserCollectList;
|
|
920
936
|
declare const api_getUserHeader: typeof getUserHeader;
|
|
@@ -952,7 +968,7 @@ declare const api_shareCommon: typeof shareCommon;
|
|
|
952
968
|
declare const api_shareVideo: typeof shareVideo;
|
|
953
969
|
declare const api_signNinan: typeof signNinan;
|
|
954
970
|
declare namespace api {
|
|
955
|
-
export { api_YDRZ as YDRZ, api_addFollower as addFollower, 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_getConcertComment as getConcertComment, api_getConcertDetail as getConcertDetail, api_getConcertInfo as getConcertInfo, api_getConcertRecommendMv as getConcertRecommendMv, api_getConcertUrl as getConcertUrl, api_getFollowerList as getFollowerList, api_getFollowingList as getFollowingList, api_getFollowingVra as getFollowingVra, api_getLyric as getLyric, api_getMVRecommend as getMVRecommend, api_getMvBySong as getMvBySong, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNewCDList as getNewCDList, api_getNewSongList as getNewSongList, api_getNinanByDate as getNinanByDate, api_getNinanSignInfo as getNinanSignInfo, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPageInfo as getPageInfo, api_getPageTab as getPageTab, 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_getRedirectUrl as getRedirectUrl, api_getResourceInfo as getResourceInfo, api_getSVideoInfo as getSVideoInfo, api_getSVideoRecommend as getSVideoRecommend, api_getSVideoSearchSuggest as getSVideoSearchSuggest, api_getSVideoUrl as getSVideoUrl, api_getSVideoUserContent as getSVideoUserContent, api_getSVideoUserInfo as getSVideoUserInfo, 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_getUserHeader as getUserHeader, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getUserSongPage as getUserSongPage, api_getVersion as getVersion, api_getVipPlaylist as getVipPlaylist, api_getVrbtOpNum as getVrbtOpNum, api_getVrbtUrl as getVrbtUrl, api_isFollowAuthor as isFollowAuthor, api_likeSong as likeSong, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_logout as logout, api_matchPlaylist as matchPlaylist, api_queryUserInfo as queryUserInfo, api_removeFollower as removeFollower, 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, api_shareCommon as shareCommon, api_shareVideo as shareVideo, api_signNinan as signNinan };
|
|
971
|
+
export { api_YDRZ as YDRZ, api_addFollower as addFollower, 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_getCloudUrl as getCloudUrl, api_getColumnInfo as getColumnInfo, api_getComment as getComment, api_getConcertComment as getConcertComment, api_getConcertDetail as getConcertDetail, api_getConcertInfo as getConcertInfo, api_getConcertRecommendMv as getConcertRecommendMv, api_getConcertUrl as getConcertUrl, api_getDLUrlV1 as getDLUrlV1, api_getFollowerList as getFollowerList, api_getFollowingList as getFollowingList, api_getFollowingVra as getFollowingVra, api_getListenRank as getListenRank, api_getLyric as getLyric, api_getMVRecommend as getMVRecommend, api_getMvBySong as getMvBySong, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNewCDList as getNewCDList, api_getNewSongList as getNewSongList, api_getNinanByDate as getNinanByDate, api_getNinanSignInfo as getNinanSignInfo, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPageInfo as getPageInfo, api_getPageTab as getPageTab, 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_getRedirectUrl as getRedirectUrl, api_getResourceInfo as getResourceInfo, api_getSVideoInfo as getSVideoInfo, api_getSVideoRecommend as getSVideoRecommend, api_getSVideoSearchSuggest as getSVideoSearchSuggest, api_getSVideoUrl as getSVideoUrl, api_getSVideoUserContent as getSVideoUserContent, api_getSVideoUserInfo as getSVideoUserInfo, 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_getUrlM2 as getUrlM2, api_getUrlV1 as getUrlV1, api_getUrlV2 as getUrlV2, api_getUserAudioBook as getUserAudioBook, api_getUserBadge as getUserBadge, api_getUserCollectList as getUserCollectList, api_getUserHeader as getUserHeader, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getUserSongPage as getUserSongPage, api_getVersion as getVersion, api_getVipPlaylist as getVipPlaylist, api_getVrbtOpNum as getVrbtOpNum, api_getVrbtUrl as getVrbtUrl, api_isFollowAuthor as isFollowAuthor, api_likeSong as likeSong, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_logout as logout, api_matchPlaylist as matchPlaylist, api_queryUserInfo as queryUserInfo, api_removeFollower as removeFollower, 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, api_shareCommon as shareCommon, api_shareVideo as shareVideo, api_signNinan as signNinan };
|
|
956
972
|
}
|
|
957
973
|
|
|
958
974
|
declare function getDeviceId(a?: number, b?: number): string;
|
|
@@ -990,7 +1006,7 @@ declare const toneFormat: {
|
|
|
990
1006
|
};
|
|
991
1007
|
declare function isQuality(quality: string | undefined): quality is Quality;
|
|
992
1008
|
declare function getQuality(url: string): Quality | '';
|
|
993
|
-
declare function changeQuality(url: string, quality: string, originalQuality?: string): string;
|
|
1009
|
+
declare function changeQuality(url: string, quality: string, originalQuality?: string, splitQuery?: boolean): string;
|
|
994
1010
|
|
|
995
1011
|
declare const getResourceId: (name: string) => "" | "2" | "2021" | "3002" | "2003" | "2002" | "2016" | "6000" | "D" | "M";
|
|
996
1012
|
|
|
@@ -1028,4 +1044,4 @@ declare function createClient(): ExpandedApi<typeof api>;
|
|
|
1028
1044
|
/** 客户端类型 */
|
|
1029
1045
|
type MiguClient = ReturnType<typeof createClient>;
|
|
1030
1046
|
|
|
1031
|
-
export { type MiguClient, index as MiguUtils, type Quality, RSAKey, URLParams, YDRZ, addFollower, addSongToMyList, addUserCollect, addUserMyList, changeQuality, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getColumnInfo, getComment, getConcertComment, getConcertDetail, getConcertInfo, getConcertRecommendMv, getConcertUrl, getDeviceId, getFollowerList, getFollowingList, getFollowingVra, getLyric, getMVRecommend, getMvBySong, getMvHls, getMvInfo, getNewCDList, getNewSongList, getNinanByDate, getNinanSignInfo, getNinanSong, getOpNum, getPacmToken, getPageInfo, getPageTab, getPlaylistInfo, getPlaylistSong, getPlaylistSquarePage, getPublicKey, getQuality, getRadioRecommend, getRadioRecommendAll, getRadioSong, getRankIndex, getRankInfo, getRecommendPlaylist, getRedirectUrl, getResourceId, getResourceInfo, getSVideoInfo, getSVideoRecommend, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSVideoUserInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollectList, getUserHeader, getUserHomePage, getUserMyList, getUserSongPage, getVersion, getVipPlaylist, getVrbtOpNum, getVrbtUrl, isFollowAuthor, isQuality, likeSong, loginNP, loginOneClick, loginPhone, loginSim, logout, matchPlaylist, api as modules, qualityList, queryUserInfo, removeFollower, removeSongFromMyList, removeUserCollect, removeUserMyList, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, shareCommon, shareVideo, signNinan, toneFormat, toneUrl };
|
|
1047
|
+
export { type MiguClient, index as MiguUtils, type Quality, RSAKey, URLParams, YDRZ, addFollower, addSongToMyList, addUserCollect, addUserMyList, changeQuality, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getCloudUrl, getColumnInfo, getComment, getConcertComment, getConcertDetail, getConcertInfo, getConcertRecommendMv, getConcertUrl, getDLUrlV1, getDeviceId, getFollowerList, getFollowingList, getFollowingVra, getListenRank, getLyric, getMVRecommend, getMvBySong, getMvHls, getMvInfo, getNewCDList, getNewSongList, getNinanByDate, getNinanSignInfo, getNinanSong, getOpNum, getPacmToken, getPageInfo, getPageTab, getPlaylistInfo, getPlaylistSong, getPlaylistSquarePage, getPublicKey, getQuality, getRadioRecommend, getRadioRecommendAll, getRadioSong, getRankIndex, getRankInfo, getRecommendPlaylist, getRedirectUrl, getResourceId, getResourceInfo, getSVideoInfo, getSVideoRecommend, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSVideoUserInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlM2, getUrlV1, getUrlV2, getUserAudioBook, getUserBadge, getUserCollectList, getUserHeader, getUserHomePage, getUserMyList, getUserSongPage, getVersion, getVipPlaylist, getVrbtOpNum, getVrbtUrl, isFollowAuthor, isQuality, likeSong, loginNP, loginOneClick, loginPhone, loginSim, logout, matchPlaylist, api as modules, qualityList, queryUserInfo, removeFollower, removeSongFromMyList, removeUserCollect, removeUserMyList, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, shareCommon, shareVideo, signNinan, toneFormat, toneUrl };
|