migu-api-enhanced 2.14.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 +26 -24
- package/dist/index.cjs +503 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +265 -12
- package/dist/index.d.ts +265 -12
- package/dist/index.js +477 -42
- package/dist/index.js.map +1 -1
- package/package.json +81 -81
package/dist/index.d.cts
CHANGED
|
@@ -126,7 +126,13 @@ declare const getPacmToken: (token?: string, type?: string, sourceId?: string, a
|
|
|
126
126
|
body: any;
|
|
127
127
|
}>;
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
/**
|
|
130
|
+
* 获取票务信息
|
|
131
|
+
* @param page 页码 可选 默认1
|
|
132
|
+
* @param size 每页数量 可选 默认20
|
|
133
|
+
* @returns 票务信息
|
|
134
|
+
*/
|
|
135
|
+
declare const getTicketInfo: (page?: number, size?: number) => Promise<any>;
|
|
130
136
|
|
|
131
137
|
/**
|
|
132
138
|
* 获取用户徽章信息
|
|
@@ -406,24 +412,42 @@ declare const getLyric: (contentId: string) => Promise<{
|
|
|
406
412
|
/**
|
|
407
413
|
* 添加用户收藏
|
|
408
414
|
* @param pacmtoken 用户pacmtoken
|
|
409
|
-
* @param
|
|
410
|
-
* @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时必填)
|
|
411
419
|
* @returns 添加结果和新的pacmtoken
|
|
412
420
|
*/
|
|
413
|
-
declare const addUserCollect: (pacmtoken: string,
|
|
421
|
+
declare const addUserCollect: (pacmtoken: string, type: string, contentId: string, title?: string, userId?: string) => Promise<{
|
|
422
|
+
success: boolean;
|
|
423
|
+
err: string;
|
|
424
|
+
data?: undefined;
|
|
425
|
+
newPacmToken?: undefined;
|
|
426
|
+
} | {
|
|
414
427
|
data: any;
|
|
415
428
|
newPacmToken: string;
|
|
429
|
+
success?: undefined;
|
|
430
|
+
err?: undefined;
|
|
416
431
|
}>;
|
|
417
432
|
|
|
418
433
|
/**
|
|
419
434
|
* 删除用户收藏
|
|
420
435
|
* @param pacmtoken 用户pacmtoken
|
|
421
|
-
* @param
|
|
436
|
+
* @param type 收藏类型 playlist:歌单 comment:评论 album:专辑
|
|
437
|
+
* @param contentId 歌单id / 评论id / 专辑id
|
|
438
|
+
* @param userId 用户id (type=comment时必填)
|
|
422
439
|
* @returns 删除结果和新的pacmtoken
|
|
423
440
|
*/
|
|
424
|
-
declare const removeUserCollect: (pacmtoken: string,
|
|
441
|
+
declare const removeUserCollect: (pacmtoken: string, type: string, contentId: string, userId?: string) => Promise<{
|
|
442
|
+
success: boolean;
|
|
443
|
+
err: string;
|
|
444
|
+
data?: undefined;
|
|
445
|
+
newPacmToken?: undefined;
|
|
446
|
+
} | {
|
|
425
447
|
data: any;
|
|
426
448
|
newPacmToken: string;
|
|
449
|
+
success?: undefined;
|
|
450
|
+
err?: undefined;
|
|
427
451
|
}>;
|
|
428
452
|
|
|
429
453
|
/**
|
|
@@ -543,7 +567,7 @@ declare const removeSongFromMyList: (pacmtoken: string, playlistId: string, cont
|
|
|
543
567
|
declare const getSVideoUserInfo: (type: string, uid?: string, videoUserId?: string) => Promise<any>;
|
|
544
568
|
|
|
545
569
|
/**
|
|
546
|
-
*
|
|
570
|
+
* 演唱会简略信息
|
|
547
571
|
*
|
|
548
572
|
* 返回 $.data.liveId 直播id 等等
|
|
549
573
|
* @param concertId 单个演唱会id
|
|
@@ -612,7 +636,7 @@ declare const signNinan: (pacmtoken: string) => Promise<{
|
|
|
612
636
|
* @param toneFlag 音色
|
|
613
637
|
* @returns 重定向URL
|
|
614
638
|
*/
|
|
615
|
-
declare const getRedirectUrl: (contentId: string, toneFlag?: string | undefined) => Promise<
|
|
639
|
+
declare const getRedirectUrl: (contentId: string, toneFlag?: string | undefined) => Promise<string>;
|
|
616
640
|
|
|
617
641
|
/**
|
|
618
642
|
* 通过演唱会推荐 MV
|
|
@@ -654,12 +678,189 @@ declare const isFollowAuthor: (pacmtoken: string, authorIds: string, authorType?
|
|
|
654
678
|
*/
|
|
655
679
|
declare const getVipPlaylist: (size?: number) => Promise<any>;
|
|
656
680
|
|
|
681
|
+
/**
|
|
682
|
+
* 用户简介
|
|
683
|
+
* @param userId 用户id
|
|
684
|
+
* @returns 用户简介
|
|
685
|
+
*/
|
|
686
|
+
declare const getUserHeader: (userId: string) => Promise<any>;
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* 获取用户歌曲主页
|
|
690
|
+
* @param userId 用户id (可选)
|
|
691
|
+
* @param videoUserId 视频用户id (可选)
|
|
692
|
+
* @returns 用户歌曲主页
|
|
693
|
+
*/
|
|
694
|
+
declare const getUserSongPage: (userId?: string, videoUserId?: string) => Promise<any>;
|
|
695
|
+
|
|
696
|
+
/**
|
|
697
|
+
* 移动端获取页面信息
|
|
698
|
+
* @param pageId 页面ID (二选一)
|
|
699
|
+
* @param sceneId 场景ID (二选一)
|
|
700
|
+
* @returns
|
|
701
|
+
*/
|
|
702
|
+
declare const getPageInfo: (pageId?: string, sceneId?: string) => Promise<any>;
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* 移动端页面底部tab
|
|
706
|
+
* @returns 主页面 + 子页面
|
|
707
|
+
*/
|
|
708
|
+
declare const getPageTab: () => Promise<any>;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* 短视频用户推荐
|
|
712
|
+
* @param pacmtoken 用户授权token
|
|
713
|
+
* @returns 短视频用户推荐
|
|
714
|
+
*/
|
|
715
|
+
declare const getSVideoRecommend: (pacmtoken: string) => Promise<{
|
|
716
|
+
data: any;
|
|
717
|
+
newPacmToken: string;
|
|
718
|
+
}>;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* 用户关注视彩号列表
|
|
722
|
+
* @param userId 用户ID
|
|
723
|
+
* @param page 分页
|
|
724
|
+
* @returns 关注列表
|
|
725
|
+
*/
|
|
726
|
+
declare const getFollowingVra: (userId: string, page?: number) => Promise<any>;
|
|
727
|
+
|
|
728
|
+
declare namespace Follower {
|
|
729
|
+
interface Music {
|
|
730
|
+
type: 'music';
|
|
731
|
+
userId: string;
|
|
732
|
+
page?: number;
|
|
733
|
+
size?: number;
|
|
734
|
+
}
|
|
735
|
+
interface Vrbt_V {
|
|
736
|
+
type: 'vrbt';
|
|
737
|
+
userId?: string;
|
|
738
|
+
videoUserId: string;
|
|
739
|
+
}
|
|
740
|
+
interface Vrbt_U {
|
|
741
|
+
type: 'vrbt';
|
|
742
|
+
userId: string;
|
|
743
|
+
videoUserId?: string;
|
|
744
|
+
}
|
|
745
|
+
type params = Music | Vrbt_V | Vrbt_U;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* 获取粉丝列表
|
|
750
|
+
* @description 不同类型返回值格式不同
|
|
751
|
+
* @param params 参数
|
|
752
|
+
* @param params.type 类型,music或vrbt
|
|
753
|
+
* @param params.userId 用户ID
|
|
754
|
+
* @param params.videoUserId 视频用户ID
|
|
755
|
+
* @param params.page 页码
|
|
756
|
+
* @param params.size 每页数量
|
|
757
|
+
* @returns 粉丝列表
|
|
758
|
+
*/
|
|
759
|
+
declare const getFollowerList: (params: Follower.params) => Promise<any>;
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* 获取关注列表
|
|
763
|
+
* @param userId 用户ID
|
|
764
|
+
* @param type 关注类型,user或singer
|
|
765
|
+
* @param page 页码
|
|
766
|
+
* @param size 每页数量
|
|
767
|
+
* @returns 关注列表
|
|
768
|
+
*/
|
|
769
|
+
declare const getFollowingList: (userId: string, type: string, page?: number, size?: number) => Promise<any>;
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* 关注歌手
|
|
773
|
+
* @param pacmtoken 用户token
|
|
774
|
+
* @param singerId 歌手id
|
|
775
|
+
* @returns 关注结果和新的pacmtoken
|
|
776
|
+
*/
|
|
777
|
+
declare const addFollower: (pacmtoken: string, singerId: string) => Promise<{
|
|
778
|
+
data: any;
|
|
779
|
+
newPacmToken: string;
|
|
780
|
+
}>;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* 取消关注歌手
|
|
784
|
+
* @param pacmtoken 用户token
|
|
785
|
+
* @param singerId 歌手id
|
|
786
|
+
* @returns 取消关注结果和新的pacmtoken
|
|
787
|
+
*/
|
|
788
|
+
declare const removeFollower: (pacmtoken: string, singerId: string) => Promise<{
|
|
789
|
+
data: any;
|
|
790
|
+
newPacmToken: string;
|
|
791
|
+
}>;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* 用户退出登录
|
|
795
|
+
* @param pacmtoken 用户token
|
|
796
|
+
* @returns 退出登录结果
|
|
797
|
+
*/
|
|
798
|
+
declare const logout: (pacmtoken: string) => Promise<any>;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* 分享视频
|
|
802
|
+
* @param resourceType 资源类型 6000:短视频 D:MV M:视频彩铃
|
|
803
|
+
* @param contentId 短视频id / MVid / vrbtId
|
|
804
|
+
* @param userId 视频用户id (可选)
|
|
805
|
+
* @returns 分享信息 (url)
|
|
806
|
+
*/
|
|
807
|
+
declare const shareVideo: (resourceType: string, contentId: string, userId?: string) => Promise<any>;
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* 分享通用内容
|
|
811
|
+
* @param resourceType 资源类型 2:歌曲 2021:歌单 2003:专辑 2002:歌手
|
|
812
|
+
* @param contentId 内容id 歌曲contentId / albumId / artistId / playlistId
|
|
813
|
+
* @param contentName 歌曲名称 / 专辑名称 / 歌手名称 / 播放列表名称
|
|
814
|
+
* @param targetUserName 当前歌单作者/歌手名称 (可选)
|
|
815
|
+
* @param copyrightId 歌曲版权id (可选)
|
|
816
|
+
* @returns 分享信息 (url)
|
|
817
|
+
*/
|
|
818
|
+
declare const shareCommon: (resourceType: string, contentId: string, contentName: string, targetUserName?: string, copyrightId?: string) => Promise<any>;
|
|
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
|
+
|
|
657
857
|
/**
|
|
658
858
|
* modules 子目录统一入口
|
|
659
859
|
* 汇总导出所有 API 函数
|
|
660
860
|
*/
|
|
661
861
|
|
|
662
862
|
declare const api_YDRZ: typeof YDRZ;
|
|
863
|
+
declare const api_addFollower: typeof addFollower;
|
|
663
864
|
declare const api_addSongToMyList: typeof addSongToMyList;
|
|
664
865
|
declare const api_addUserCollect: typeof addUserCollect;
|
|
665
866
|
declare const api_addUserMyList: typeof addUserMyList;
|
|
@@ -669,6 +870,7 @@ declare const api_dislikeSong: typeof dislikeSong;
|
|
|
669
870
|
declare const api_editUserMyList: typeof editUserMyList;
|
|
670
871
|
declare const api_getAlbumInfo: typeof getAlbumInfo;
|
|
671
872
|
declare const api_getAlbumSong: typeof getAlbumSong;
|
|
873
|
+
declare const api_getCloudUrl: typeof getCloudUrl;
|
|
672
874
|
declare const api_getColumnInfo: typeof getColumnInfo;
|
|
673
875
|
declare const api_getComment: typeof getComment;
|
|
674
876
|
declare const api_getConcertComment: typeof getConcertComment;
|
|
@@ -676,6 +878,11 @@ declare const api_getConcertDetail: typeof getConcertDetail;
|
|
|
676
878
|
declare const api_getConcertInfo: typeof getConcertInfo;
|
|
677
879
|
declare const api_getConcertRecommendMv: typeof getConcertRecommendMv;
|
|
678
880
|
declare const api_getConcertUrl: typeof getConcertUrl;
|
|
881
|
+
declare const api_getDLUrlV1: typeof getDLUrlV1;
|
|
882
|
+
declare const api_getFollowerList: typeof getFollowerList;
|
|
883
|
+
declare const api_getFollowingList: typeof getFollowingList;
|
|
884
|
+
declare const api_getFollowingVra: typeof getFollowingVra;
|
|
885
|
+
declare const api_getListenRank: typeof getListenRank;
|
|
679
886
|
declare const api_getLyric: typeof getLyric;
|
|
680
887
|
declare const api_getMVRecommend: typeof getMVRecommend;
|
|
681
888
|
declare const api_getMvBySong: typeof getMvBySong;
|
|
@@ -688,6 +895,8 @@ declare const api_getNinanSignInfo: typeof getNinanSignInfo;
|
|
|
688
895
|
declare const api_getNinanSong: typeof getNinanSong;
|
|
689
896
|
declare const api_getOpNum: typeof getOpNum;
|
|
690
897
|
declare const api_getPacmToken: typeof getPacmToken;
|
|
898
|
+
declare const api_getPageInfo: typeof getPageInfo;
|
|
899
|
+
declare const api_getPageTab: typeof getPageTab;
|
|
691
900
|
declare const api_getPlaylistInfo: typeof getPlaylistInfo;
|
|
692
901
|
declare const api_getPlaylistSong: typeof getPlaylistSong;
|
|
693
902
|
declare const api_getPlaylistSquarePage: typeof getPlaylistSquarePage;
|
|
@@ -700,6 +909,7 @@ declare const api_getRecommendPlaylist: typeof getRecommendPlaylist;
|
|
|
700
909
|
declare const api_getRedirectUrl: typeof getRedirectUrl;
|
|
701
910
|
declare const api_getResourceInfo: typeof getResourceInfo;
|
|
702
911
|
declare const api_getSVideoInfo: typeof getSVideoInfo;
|
|
912
|
+
declare const api_getSVideoRecommend: typeof getSVideoRecommend;
|
|
703
913
|
declare const api_getSVideoSearchSuggest: typeof getSVideoSearchSuggest;
|
|
704
914
|
declare const api_getSVideoUrl: typeof getSVideoUrl;
|
|
705
915
|
declare const api_getSVideoUserContent: typeof getSVideoUserContent;
|
|
@@ -717,12 +927,16 @@ declare const api_getSingerSong: typeof getSingerSong;
|
|
|
717
927
|
declare const api_getTicketInfo: typeof getTicketInfo;
|
|
718
928
|
declare const api_getTodayRecommend: typeof getTodayRecommend;
|
|
719
929
|
declare const api_getUrlH5V24: typeof getUrlH5V24;
|
|
930
|
+
declare const api_getUrlM2: typeof getUrlM2;
|
|
720
931
|
declare const api_getUrlV1: typeof getUrlV1;
|
|
721
932
|
declare const api_getUrlV2: typeof getUrlV2;
|
|
933
|
+
declare const api_getUserAudioBook: typeof getUserAudioBook;
|
|
722
934
|
declare const api_getUserBadge: typeof getUserBadge;
|
|
723
935
|
declare const api_getUserCollectList: typeof getUserCollectList;
|
|
936
|
+
declare const api_getUserHeader: typeof getUserHeader;
|
|
724
937
|
declare const api_getUserHomePage: typeof getUserHomePage;
|
|
725
938
|
declare const api_getUserMyList: typeof getUserMyList;
|
|
939
|
+
declare const api_getUserSongPage: typeof getUserSongPage;
|
|
726
940
|
declare const api_getVersion: typeof getVersion;
|
|
727
941
|
declare const api_getVipPlaylist: typeof getVipPlaylist;
|
|
728
942
|
declare const api_getVrbtOpNum: typeof getVrbtOpNum;
|
|
@@ -733,8 +947,10 @@ declare const api_loginNP: typeof loginNP;
|
|
|
733
947
|
declare const api_loginOneClick: typeof loginOneClick;
|
|
734
948
|
declare const api_loginPhone: typeof loginPhone;
|
|
735
949
|
declare const api_loginSim: typeof loginSim;
|
|
950
|
+
declare const api_logout: typeof logout;
|
|
736
951
|
declare const api_matchPlaylist: typeof matchPlaylist;
|
|
737
952
|
declare const api_queryUserInfo: typeof queryUserInfo;
|
|
953
|
+
declare const api_removeFollower: typeof removeFollower;
|
|
738
954
|
declare const api_removeSongFromMyList: typeof removeSongFromMyList;
|
|
739
955
|
declare const api_removeUserCollect: typeof removeUserCollect;
|
|
740
956
|
declare const api_removeUserMyList: typeof removeUserMyList;
|
|
@@ -748,9 +964,11 @@ declare const api_searchSinger: typeof searchSinger;
|
|
|
748
964
|
declare const api_searchSong: typeof searchSong;
|
|
749
965
|
declare const api_searchSuggest: typeof searchSuggest;
|
|
750
966
|
declare const api_searchTicket: typeof searchTicket;
|
|
967
|
+
declare const api_shareCommon: typeof shareCommon;
|
|
968
|
+
declare const api_shareVideo: typeof shareVideo;
|
|
751
969
|
declare const api_signNinan: typeof signNinan;
|
|
752
970
|
declare namespace api {
|
|
753
|
-
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_getConcertComment as getConcertComment, api_getConcertDetail as getConcertDetail, api_getConcertInfo as getConcertInfo, api_getConcertRecommendMv as getConcertRecommendMv, api_getConcertUrl as getConcertUrl, 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_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_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_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, 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_matchPlaylist as matchPlaylist, 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, 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 };
|
|
754
972
|
}
|
|
755
973
|
|
|
756
974
|
declare function getDeviceId(a?: number, b?: number): string;
|
|
@@ -768,13 +986,45 @@ declare class RSAKey {
|
|
|
768
986
|
|
|
769
987
|
declare function URLParams($: object | string): string;
|
|
770
988
|
|
|
989
|
+
declare const qualityList: readonly ["PQ", "HQ", "SQ", "ZQ24", "ZQ32", "Z3D"];
|
|
990
|
+
type Quality = (typeof qualityList)[number];
|
|
991
|
+
declare const toneUrl: {
|
|
992
|
+
PQ: string;
|
|
993
|
+
HQ: string;
|
|
994
|
+
SQ: string;
|
|
995
|
+
ZQ24: string;
|
|
996
|
+
ZQ32: string;
|
|
997
|
+
Z3D: string;
|
|
998
|
+
};
|
|
999
|
+
declare const toneFormat: {
|
|
1000
|
+
PQ: string;
|
|
1001
|
+
HQ: string;
|
|
1002
|
+
SQ: string;
|
|
1003
|
+
ZQ24: string;
|
|
1004
|
+
ZQ32: string;
|
|
1005
|
+
Z3D: string;
|
|
1006
|
+
};
|
|
1007
|
+
declare function isQuality(quality: string | undefined): quality is Quality;
|
|
1008
|
+
declare function getQuality(url: string): Quality | '';
|
|
1009
|
+
declare function changeQuality(url: string, quality: string, originalQuality?: string, splitQuery?: boolean): string;
|
|
1010
|
+
|
|
1011
|
+
declare const getResourceId: (name: string) => "" | "2" | "2021" | "3002" | "2003" | "2002" | "2016" | "6000" | "D" | "M";
|
|
1012
|
+
|
|
1013
|
+
type index_Quality = Quality;
|
|
771
1014
|
type index_RSAKey = RSAKey;
|
|
772
1015
|
declare const index_RSAKey: typeof RSAKey;
|
|
773
1016
|
declare const index_URLParams: typeof URLParams;
|
|
1017
|
+
declare const index_changeQuality: typeof changeQuality;
|
|
774
1018
|
declare const index_getDeviceId: typeof getDeviceId;
|
|
775
1019
|
declare const index_getPublicKey: typeof getPublicKey;
|
|
1020
|
+
declare const index_getQuality: typeof getQuality;
|
|
1021
|
+
declare const index_getResourceId: typeof getResourceId;
|
|
1022
|
+
declare const index_isQuality: typeof isQuality;
|
|
1023
|
+
declare const index_qualityList: typeof qualityList;
|
|
1024
|
+
declare const index_toneFormat: typeof toneFormat;
|
|
1025
|
+
declare const index_toneUrl: typeof toneUrl;
|
|
776
1026
|
declare namespace index {
|
|
777
|
-
export { index_RSAKey as RSAKey, index_URLParams as URLParams, index_getDeviceId as getDeviceId, index_getPublicKey as getPublicKey };
|
|
1027
|
+
export { type index_Quality as Quality, index_RSAKey as RSAKey, index_URLParams as URLParams, index_changeQuality as changeQuality, index_getDeviceId as getDeviceId, index_getPublicKey as getPublicKey, index_getQuality as getQuality, index_getResourceId as getResourceId, index_isQuality as isQuality, index_qualityList as qualityList, index_toneFormat as toneFormat, index_toneUrl as toneUrl };
|
|
778
1028
|
}
|
|
779
1029
|
|
|
780
1030
|
/**
|
|
@@ -782,13 +1032,16 @@ declare namespace index {
|
|
|
782
1032
|
* 直接复用 modules 导出,提供 createClient 工厂
|
|
783
1033
|
*/
|
|
784
1034
|
|
|
1035
|
+
type ExpandedApi<T> = {
|
|
1036
|
+
[P in keyof T]: T[P];
|
|
1037
|
+
};
|
|
785
1038
|
/**
|
|
786
1039
|
* 创建一个咪咕 API 客户端实例
|
|
787
1040
|
* 返回对象包含所有 API 方法(直接复用 modules 函数)
|
|
788
1041
|
* @returns 包含所有 API 方法的对象
|
|
789
1042
|
*/
|
|
790
|
-
declare function createClient(): typeof api
|
|
1043
|
+
declare function createClient(): ExpandedApi<typeof api>;
|
|
791
1044
|
/** 客户端类型 */
|
|
792
1045
|
type MiguClient = ReturnType<typeof createClient>;
|
|
793
1046
|
|
|
794
|
-
export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, addSongToMyList, addUserCollect, addUserMyList, checkCanListen, checkToken, createClient, dislikeSong, editUserMyList, getAlbumInfo, getAlbumSong, getColumnInfo, getComment, getConcertComment, getConcertDetail, getConcertInfo, getConcertRecommendMv, getConcertUrl, getDeviceId, getLyric, getMVRecommend, getMvBySong, getMvHls, getMvInfo, getNewCDList, getNewSongList, getNinanByDate, getNinanSignInfo, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPlaylistSquarePage, getPublicKey, getRadioRecommend, getRadioRecommendAll, getRadioSong, getRankIndex, getRankInfo, getRecommendPlaylist, getRedirectUrl, getResourceInfo, getSVideoInfo, getSVideoSearchSuggest, getSVideoUrl, getSVideoUserContent, getSVideoUserInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollectList, getUserHomePage, getUserMyList, getVersion, getVipPlaylist, getVrbtOpNum, getVrbtUrl, isFollowAuthor, likeSong, loginNP, loginOneClick, loginPhone, loginSim, matchPlaylist, api as modules, queryUserInfo, removeSongFromMyList, removeUserCollect, removeUserMyList, searchAlbum, searchConcert, searchLrc, searchMv, searchRbt, searchSVideo, searchSinger, searchSong, searchSuggest, searchTicket, signNinan };
|
|
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 };
|