migu-api-enhanced 2.14.0 → 2.18.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/README.md +26 -24
- package/dist/index.cjs +388 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +249 -12
- package/dist/index.d.ts +249 -12
- package/dist/index.js +367 -40
- package/dist/index.js.map +1 -1
- package/package.json +81 -81
package/dist/index.d.ts
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
|
* 获取用户徽章信息
|
|
@@ -403,27 +409,71 @@ declare const getLyric: (contentId: string) => Promise<{
|
|
|
403
409
|
data?: undefined;
|
|
404
410
|
}>;
|
|
405
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
|
+
|
|
406
438
|
/**
|
|
407
439
|
* 添加用户收藏
|
|
408
440
|
* @param pacmtoken 用户pacmtoken
|
|
409
|
-
* @param playlistId 播放列表id
|
|
410
|
-
* @param title 播放列表标题
|
|
441
|
+
* @param params params.playlistId 播放列表id
|
|
442
|
+
* @param params.title 播放列表标题
|
|
411
443
|
* @returns 添加结果和新的pacmtoken
|
|
412
444
|
*/
|
|
413
|
-
declare const addUserCollect: (pacmtoken: string,
|
|
445
|
+
declare const addUserCollect: (pacmtoken: string, params: AddUserCollect.params) => Promise<{
|
|
446
|
+
success: boolean;
|
|
447
|
+
err: string;
|
|
448
|
+
data?: undefined;
|
|
449
|
+
newPacmToken?: undefined;
|
|
450
|
+
} | {
|
|
414
451
|
data: any;
|
|
415
452
|
newPacmToken: string;
|
|
453
|
+
success?: undefined;
|
|
454
|
+
err?: undefined;
|
|
416
455
|
}>;
|
|
417
456
|
|
|
418
457
|
/**
|
|
419
458
|
* 删除用户收藏
|
|
420
459
|
* @param pacmtoken 用户pacmtoken
|
|
421
|
-
* @param
|
|
460
|
+
* @param params 删除收藏参数
|
|
461
|
+
* @param params.type 收藏类型 -playlist或comment
|
|
462
|
+
* @param params.playlistId 播放列表id
|
|
463
|
+
* @param params.userId 用户id
|
|
464
|
+
* @param params.commentId 评论id
|
|
422
465
|
* @returns 删除结果和新的pacmtoken
|
|
423
466
|
*/
|
|
424
|
-
declare const removeUserCollect: (pacmtoken: string,
|
|
467
|
+
declare const removeUserCollect: (pacmtoken: string, params: RemoveUserCollect.params) => Promise<{
|
|
468
|
+
success: boolean;
|
|
469
|
+
err: string;
|
|
470
|
+
data?: undefined;
|
|
471
|
+
newPacmToken?: undefined;
|
|
472
|
+
} | {
|
|
425
473
|
data: any;
|
|
426
474
|
newPacmToken: string;
|
|
475
|
+
success?: undefined;
|
|
476
|
+
err?: undefined;
|
|
427
477
|
}>;
|
|
428
478
|
|
|
429
479
|
/**
|
|
@@ -543,7 +593,7 @@ declare const removeSongFromMyList: (pacmtoken: string, playlistId: string, cont
|
|
|
543
593
|
declare const getSVideoUserInfo: (type: string, uid?: string, videoUserId?: string) => Promise<any>;
|
|
544
594
|
|
|
545
595
|
/**
|
|
546
|
-
*
|
|
596
|
+
* 演唱会简略信息
|
|
547
597
|
*
|
|
548
598
|
* 返回 $.data.liveId 直播id 等等
|
|
549
599
|
* @param concertId 单个演唱会id
|
|
@@ -612,7 +662,7 @@ declare const signNinan: (pacmtoken: string) => Promise<{
|
|
|
612
662
|
* @param toneFlag 音色
|
|
613
663
|
* @returns 重定向URL
|
|
614
664
|
*/
|
|
615
|
-
declare const getRedirectUrl: (contentId: string, toneFlag?: string | undefined) => Promise<
|
|
665
|
+
declare const getRedirectUrl: (contentId: string, toneFlag?: string | undefined) => Promise<string>;
|
|
616
666
|
|
|
617
667
|
/**
|
|
618
668
|
* 通过演唱会推荐 MV
|
|
@@ -654,12 +704,152 @@ declare const isFollowAuthor: (pacmtoken: string, authorIds: string, authorType?
|
|
|
654
704
|
*/
|
|
655
705
|
declare const getVipPlaylist: (size?: number) => Promise<any>;
|
|
656
706
|
|
|
707
|
+
/**
|
|
708
|
+
* 用户简介
|
|
709
|
+
* @param userId 用户id
|
|
710
|
+
* @returns 用户简介
|
|
711
|
+
*/
|
|
712
|
+
declare const getUserHeader: (userId: string) => Promise<any>;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* 获取用户歌曲主页
|
|
716
|
+
* @param userId 用户id (可选)
|
|
717
|
+
* @param videoUserId 视频用户id (可选)
|
|
718
|
+
* @returns 用户歌曲主页
|
|
719
|
+
*/
|
|
720
|
+
declare const getUserSongPage: (userId?: string, videoUserId?: string) => Promise<any>;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* 移动端获取页面信息
|
|
724
|
+
* @param pageId 页面ID (二选一)
|
|
725
|
+
* @param sceneId 场景ID (二选一)
|
|
726
|
+
* @returns
|
|
727
|
+
*/
|
|
728
|
+
declare const getPageInfo: (pageId?: string, sceneId?: string) => Promise<any>;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* 移动端页面底部tab
|
|
732
|
+
* @returns 主页面 + 子页面
|
|
733
|
+
*/
|
|
734
|
+
declare const getPageTab: () => Promise<any>;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* 短视频用户推荐
|
|
738
|
+
* @param pacmtoken 用户授权token
|
|
739
|
+
* @returns 短视频用户推荐
|
|
740
|
+
*/
|
|
741
|
+
declare const getSVideoRecommend: (pacmtoken: string) => Promise<{
|
|
742
|
+
data: any;
|
|
743
|
+
newPacmToken: string;
|
|
744
|
+
}>;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* 用户关注视彩号列表
|
|
748
|
+
* @param userId 用户ID
|
|
749
|
+
* @param page 分页
|
|
750
|
+
* @returns 关注列表
|
|
751
|
+
*/
|
|
752
|
+
declare const getFollowingVra: (userId: string, page?: number) => Promise<any>;
|
|
753
|
+
|
|
754
|
+
declare namespace Follower {
|
|
755
|
+
interface Music {
|
|
756
|
+
type: 'music';
|
|
757
|
+
userId: string;
|
|
758
|
+
page?: number;
|
|
759
|
+
size?: number;
|
|
760
|
+
}
|
|
761
|
+
interface Vrbt_V {
|
|
762
|
+
type: 'vrbt';
|
|
763
|
+
userId?: string;
|
|
764
|
+
videoUserId: string;
|
|
765
|
+
}
|
|
766
|
+
interface Vrbt_U {
|
|
767
|
+
type: 'vrbt';
|
|
768
|
+
userId: string;
|
|
769
|
+
videoUserId?: string;
|
|
770
|
+
}
|
|
771
|
+
type params = Music | Vrbt_V | Vrbt_U;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/**
|
|
775
|
+
* 获取粉丝列表
|
|
776
|
+
* @description 不同类型返回值格式不同
|
|
777
|
+
* @param params 参数
|
|
778
|
+
* @param params.type 类型,music或vrbt
|
|
779
|
+
* @param params.userId 用户ID
|
|
780
|
+
* @param params.videoUserId 视频用户ID
|
|
781
|
+
* @param params.page 页码
|
|
782
|
+
* @param params.size 每页数量
|
|
783
|
+
* @returns 粉丝列表
|
|
784
|
+
*/
|
|
785
|
+
declare const getFollowerList: (params: Follower.params) => Promise<any>;
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* 获取关注列表
|
|
789
|
+
* @param userId 用户ID
|
|
790
|
+
* @param type 关注类型,user或singer
|
|
791
|
+
* @param page 页码
|
|
792
|
+
* @param size 每页数量
|
|
793
|
+
* @returns 关注列表
|
|
794
|
+
*/
|
|
795
|
+
declare const getFollowingList: (userId: string, type: string, page?: number, size?: number) => Promise<any>;
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* 关注歌手
|
|
799
|
+
* @param pacmtoken 用户token
|
|
800
|
+
* @param singerId 歌手id
|
|
801
|
+
* @returns 关注结果和新的pacmtoken
|
|
802
|
+
*/
|
|
803
|
+
declare const addFollower: (pacmtoken: string, singerId: string) => Promise<{
|
|
804
|
+
data: any;
|
|
805
|
+
newPacmToken: string;
|
|
806
|
+
}>;
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* 取消关注歌手
|
|
810
|
+
* @param pacmtoken 用户token
|
|
811
|
+
* @param singerId 歌手id
|
|
812
|
+
* @returns 取消关注结果和新的pacmtoken
|
|
813
|
+
*/
|
|
814
|
+
declare const removeFollower: (pacmtoken: string, singerId: string) => Promise<{
|
|
815
|
+
data: any;
|
|
816
|
+
newPacmToken: string;
|
|
817
|
+
}>;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* 用户退出登录
|
|
821
|
+
* @param pacmtoken 用户token
|
|
822
|
+
* @returns 退出登录结果
|
|
823
|
+
*/
|
|
824
|
+
declare const logout: (pacmtoken: string) => Promise<any>;
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* 分享视频
|
|
828
|
+
* @param resourceType 资源类型 6000:短视频 D:MV
|
|
829
|
+
* @param contentId 视频id / MVid
|
|
830
|
+
* @param userId 视频用户id (可选)
|
|
831
|
+
* @returns 分享信息 (url)
|
|
832
|
+
*/
|
|
833
|
+
declare const shareVideo: (resourceType: string, contentId: string, userId?: string) => Promise<any>;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* 分享通用内容
|
|
837
|
+
* @param resourceType 资源类型 2:歌曲 2021:歌单 2003:专辑 2002:歌手
|
|
838
|
+
* @param contentId 内容id 歌曲contentId / albumId / artistId / playlistId
|
|
839
|
+
* @param contentName 歌曲名称 / 专辑名称 / 歌手名称 / 播放列表名称
|
|
840
|
+
* @param targetUserName 当前歌单作者/歌手名称 (可选)
|
|
841
|
+
* @param copyrightId 歌曲版权id (可选)
|
|
842
|
+
* @returns 分享信息 (url)
|
|
843
|
+
*/
|
|
844
|
+
declare const shareCommon: (resourceType: string, contentId: string, contentName: string, targetUserName?: string, copyrightId?: string) => Promise<any>;
|
|
845
|
+
|
|
657
846
|
/**
|
|
658
847
|
* modules 子目录统一入口
|
|
659
848
|
* 汇总导出所有 API 函数
|
|
660
849
|
*/
|
|
661
850
|
|
|
662
851
|
declare const api_YDRZ: typeof YDRZ;
|
|
852
|
+
declare const api_addFollower: typeof addFollower;
|
|
663
853
|
declare const api_addSongToMyList: typeof addSongToMyList;
|
|
664
854
|
declare const api_addUserCollect: typeof addUserCollect;
|
|
665
855
|
declare const api_addUserMyList: typeof addUserMyList;
|
|
@@ -676,6 +866,9 @@ declare const api_getConcertDetail: typeof getConcertDetail;
|
|
|
676
866
|
declare const api_getConcertInfo: typeof getConcertInfo;
|
|
677
867
|
declare const api_getConcertRecommendMv: typeof getConcertRecommendMv;
|
|
678
868
|
declare const api_getConcertUrl: typeof getConcertUrl;
|
|
869
|
+
declare const api_getFollowerList: typeof getFollowerList;
|
|
870
|
+
declare const api_getFollowingList: typeof getFollowingList;
|
|
871
|
+
declare const api_getFollowingVra: typeof getFollowingVra;
|
|
679
872
|
declare const api_getLyric: typeof getLyric;
|
|
680
873
|
declare const api_getMVRecommend: typeof getMVRecommend;
|
|
681
874
|
declare const api_getMvBySong: typeof getMvBySong;
|
|
@@ -688,6 +881,8 @@ declare const api_getNinanSignInfo: typeof getNinanSignInfo;
|
|
|
688
881
|
declare const api_getNinanSong: typeof getNinanSong;
|
|
689
882
|
declare const api_getOpNum: typeof getOpNum;
|
|
690
883
|
declare const api_getPacmToken: typeof getPacmToken;
|
|
884
|
+
declare const api_getPageInfo: typeof getPageInfo;
|
|
885
|
+
declare const api_getPageTab: typeof getPageTab;
|
|
691
886
|
declare const api_getPlaylistInfo: typeof getPlaylistInfo;
|
|
692
887
|
declare const api_getPlaylistSong: typeof getPlaylistSong;
|
|
693
888
|
declare const api_getPlaylistSquarePage: typeof getPlaylistSquarePage;
|
|
@@ -700,6 +895,7 @@ declare const api_getRecommendPlaylist: typeof getRecommendPlaylist;
|
|
|
700
895
|
declare const api_getRedirectUrl: typeof getRedirectUrl;
|
|
701
896
|
declare const api_getResourceInfo: typeof getResourceInfo;
|
|
702
897
|
declare const api_getSVideoInfo: typeof getSVideoInfo;
|
|
898
|
+
declare const api_getSVideoRecommend: typeof getSVideoRecommend;
|
|
703
899
|
declare const api_getSVideoSearchSuggest: typeof getSVideoSearchSuggest;
|
|
704
900
|
declare const api_getSVideoUrl: typeof getSVideoUrl;
|
|
705
901
|
declare const api_getSVideoUserContent: typeof getSVideoUserContent;
|
|
@@ -721,8 +917,10 @@ declare const api_getUrlV1: typeof getUrlV1;
|
|
|
721
917
|
declare const api_getUrlV2: typeof getUrlV2;
|
|
722
918
|
declare const api_getUserBadge: typeof getUserBadge;
|
|
723
919
|
declare const api_getUserCollectList: typeof getUserCollectList;
|
|
920
|
+
declare const api_getUserHeader: typeof getUserHeader;
|
|
724
921
|
declare const api_getUserHomePage: typeof getUserHomePage;
|
|
725
922
|
declare const api_getUserMyList: typeof getUserMyList;
|
|
923
|
+
declare const api_getUserSongPage: typeof getUserSongPage;
|
|
726
924
|
declare const api_getVersion: typeof getVersion;
|
|
727
925
|
declare const api_getVipPlaylist: typeof getVipPlaylist;
|
|
728
926
|
declare const api_getVrbtOpNum: typeof getVrbtOpNum;
|
|
@@ -733,8 +931,10 @@ declare const api_loginNP: typeof loginNP;
|
|
|
733
931
|
declare const api_loginOneClick: typeof loginOneClick;
|
|
734
932
|
declare const api_loginPhone: typeof loginPhone;
|
|
735
933
|
declare const api_loginSim: typeof loginSim;
|
|
934
|
+
declare const api_logout: typeof logout;
|
|
736
935
|
declare const api_matchPlaylist: typeof matchPlaylist;
|
|
737
936
|
declare const api_queryUserInfo: typeof queryUserInfo;
|
|
937
|
+
declare const api_removeFollower: typeof removeFollower;
|
|
738
938
|
declare const api_removeSongFromMyList: typeof removeSongFromMyList;
|
|
739
939
|
declare const api_removeUserCollect: typeof removeUserCollect;
|
|
740
940
|
declare const api_removeUserMyList: typeof removeUserMyList;
|
|
@@ -748,9 +948,11 @@ declare const api_searchSinger: typeof searchSinger;
|
|
|
748
948
|
declare const api_searchSong: typeof searchSong;
|
|
749
949
|
declare const api_searchSuggest: typeof searchSuggest;
|
|
750
950
|
declare const api_searchTicket: typeof searchTicket;
|
|
951
|
+
declare const api_shareCommon: typeof shareCommon;
|
|
952
|
+
declare const api_shareVideo: typeof shareVideo;
|
|
751
953
|
declare const api_signNinan: typeof signNinan;
|
|
752
954
|
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 };
|
|
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 };
|
|
754
956
|
}
|
|
755
957
|
|
|
756
958
|
declare function getDeviceId(a?: number, b?: number): string;
|
|
@@ -768,13 +970,45 @@ declare class RSAKey {
|
|
|
768
970
|
|
|
769
971
|
declare function URLParams($: object | string): string;
|
|
770
972
|
|
|
973
|
+
declare const qualityList: readonly ["PQ", "HQ", "SQ", "ZQ24", "ZQ32", "Z3D"];
|
|
974
|
+
type Quality = (typeof qualityList)[number];
|
|
975
|
+
declare const toneUrl: {
|
|
976
|
+
PQ: string;
|
|
977
|
+
HQ: string;
|
|
978
|
+
SQ: string;
|
|
979
|
+
ZQ24: string;
|
|
980
|
+
ZQ32: string;
|
|
981
|
+
Z3D: string;
|
|
982
|
+
};
|
|
983
|
+
declare const toneFormat: {
|
|
984
|
+
PQ: string;
|
|
985
|
+
HQ: string;
|
|
986
|
+
SQ: string;
|
|
987
|
+
ZQ24: string;
|
|
988
|
+
ZQ32: string;
|
|
989
|
+
Z3D: string;
|
|
990
|
+
};
|
|
991
|
+
declare function isQuality(quality: string | undefined): quality is Quality;
|
|
992
|
+
declare function getQuality(url: string): Quality | '';
|
|
993
|
+
declare function changeQuality(url: string, quality: string, originalQuality?: string): string;
|
|
994
|
+
|
|
995
|
+
declare const getResourceId: (name: string) => "" | "2" | "2021" | "3002" | "2003" | "2002" | "2016" | "6000" | "D" | "M";
|
|
996
|
+
|
|
997
|
+
type index_Quality = Quality;
|
|
771
998
|
type index_RSAKey = RSAKey;
|
|
772
999
|
declare const index_RSAKey: typeof RSAKey;
|
|
773
1000
|
declare const index_URLParams: typeof URLParams;
|
|
1001
|
+
declare const index_changeQuality: typeof changeQuality;
|
|
774
1002
|
declare const index_getDeviceId: typeof getDeviceId;
|
|
775
1003
|
declare const index_getPublicKey: typeof getPublicKey;
|
|
1004
|
+
declare const index_getQuality: typeof getQuality;
|
|
1005
|
+
declare const index_getResourceId: typeof getResourceId;
|
|
1006
|
+
declare const index_isQuality: typeof isQuality;
|
|
1007
|
+
declare const index_qualityList: typeof qualityList;
|
|
1008
|
+
declare const index_toneFormat: typeof toneFormat;
|
|
1009
|
+
declare const index_toneUrl: typeof toneUrl;
|
|
776
1010
|
declare namespace index {
|
|
777
|
-
export { index_RSAKey as RSAKey, index_URLParams as URLParams, index_getDeviceId as getDeviceId, index_getPublicKey as getPublicKey };
|
|
1011
|
+
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
1012
|
}
|
|
779
1013
|
|
|
780
1014
|
/**
|
|
@@ -782,13 +1016,16 @@ declare namespace index {
|
|
|
782
1016
|
* 直接复用 modules 导出,提供 createClient 工厂
|
|
783
1017
|
*/
|
|
784
1018
|
|
|
1019
|
+
type ExpandedApi<T> = {
|
|
1020
|
+
[P in keyof T]: T[P];
|
|
1021
|
+
};
|
|
785
1022
|
/**
|
|
786
1023
|
* 创建一个咪咕 API 客户端实例
|
|
787
1024
|
* 返回对象包含所有 API 方法(直接复用 modules 函数)
|
|
788
1025
|
* @returns 包含所有 API 方法的对象
|
|
789
1026
|
*/
|
|
790
|
-
declare function createClient(): typeof api
|
|
1027
|
+
declare function createClient(): ExpandedApi<typeof api>;
|
|
791
1028
|
/** 客户端类型 */
|
|
792
1029
|
type MiguClient = ReturnType<typeof createClient>;
|
|
793
1030
|
|
|
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 };
|
|
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 };
|