migu-api-enhanced 2.0.1 → 2.3.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 +207 -207
- package/dist/index.cjs +200 -197
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -20
- package/dist/index.d.ts +38 -20
- package/dist/index.js +195 -197
- package/dist/index.js.map +1 -1
- package/package.json +75 -64
package/dist/index.d.ts
CHANGED
|
@@ -45,8 +45,8 @@ declare const getRecommendPlaylist: () => Promise<any>;
|
|
|
45
45
|
declare const getSceneRecommend: (scene?: string, size?: number) => Promise<any>;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* 获取电台推荐
|
|
49
|
-
* @param type 1:上瘾电台 2:听见不同
|
|
48
|
+
* 获取电台推荐 (主页电台)
|
|
49
|
+
* @param type 1:上瘾电台 2:听见不同 <- 私人FM <-ALL
|
|
50
50
|
* @returns
|
|
51
51
|
*/
|
|
52
52
|
declare const getRadioRecommend: (type?: number) => Promise<any>;
|
|
@@ -56,15 +56,15 @@ size?: number, hotCommentStart?: number) => Promise<any>;
|
|
|
56
56
|
|
|
57
57
|
declare const getResourceInfo: (resourceId: string, resourceType?: number) => Promise<any>;
|
|
58
58
|
|
|
59
|
-
declare const checkCanListen: (body: any) => Promise<any>;
|
|
59
|
+
declare const checkCanListen: (body: Record<string, any>) => Promise<any>;
|
|
60
60
|
|
|
61
61
|
declare const getOpNum: (ids: string) => Promise<any>;
|
|
62
62
|
|
|
63
63
|
declare const getUrlV1: (contentId: string, copyrightId: string, resourceType?: string) => Promise<any>;
|
|
64
64
|
|
|
65
|
-
declare const getUrlV2: (contentId: string, copyrightId: string, resourceType?: string, pacmtoken?: string) => Promise<any>;
|
|
65
|
+
declare const getUrlV2: (contentId: string, copyrightId: string, toneFlag?: string, resourceType?: string, pacmtoken?: string) => Promise<any>;
|
|
66
66
|
|
|
67
|
-
declare const getUrlH5V24: (contentId: string, copyrightId: string, resourceType?: string) => Promise<any>;
|
|
67
|
+
declare const getUrlH5V24: (contentId: string, copyrightId: string, toneFlag?: string, resourceType?: string) => Promise<any>;
|
|
68
68
|
|
|
69
69
|
declare const getVersion: (channel?: string, version?: string, ua?: string) => Promise<any>;
|
|
70
70
|
|
|
@@ -88,7 +88,6 @@ declare const checkToken: (token?: string) => Promise<any>;
|
|
|
88
88
|
|
|
89
89
|
declare const getPacmToken: (token?: string, type?: string, sourceId?: string, activityId?: string) => Promise<{
|
|
90
90
|
pacmToken: string;
|
|
91
|
-
cookie: string[];
|
|
92
91
|
body: any;
|
|
93
92
|
}>;
|
|
94
93
|
|
|
@@ -96,22 +95,22 @@ declare const getTicketInfo: (page?: number, pageCount?: number) => Promise<any>
|
|
|
96
95
|
|
|
97
96
|
declare const getUserBadge: (pacmtoken: string) => Promise<{
|
|
98
97
|
data: any;
|
|
99
|
-
|
|
98
|
+
newPacmToken: string;
|
|
100
99
|
}>;
|
|
101
100
|
|
|
102
101
|
declare const queryUserInfo: (pacmtoken: string) => Promise<{
|
|
103
102
|
data: any;
|
|
104
|
-
|
|
103
|
+
newPacmToken: string;
|
|
105
104
|
}>;
|
|
106
105
|
|
|
107
106
|
declare const getUserHomePage: (pacmtoken: string) => Promise<{
|
|
108
107
|
data: any;
|
|
109
|
-
|
|
108
|
+
newPacmToken: string;
|
|
110
109
|
}>;
|
|
111
110
|
|
|
112
111
|
declare const getTodayRecommend: (pacmtoken: string) => Promise<{
|
|
113
112
|
data: any;
|
|
114
|
-
|
|
113
|
+
newPacmToken: string;
|
|
115
114
|
}>;
|
|
116
115
|
|
|
117
116
|
declare const loginSim: {
|
|
@@ -123,11 +122,6 @@ declare const loginSim: {
|
|
|
123
122
|
error?: undefined;
|
|
124
123
|
}>;
|
|
125
124
|
simQuery(sim_sessionid: string): Promise<{
|
|
126
|
-
error: string;
|
|
127
|
-
token?: undefined;
|
|
128
|
-
status?: undefined;
|
|
129
|
-
body?: undefined;
|
|
130
|
-
} | {
|
|
131
125
|
token: any;
|
|
132
126
|
status: any;
|
|
133
127
|
error?: undefined;
|
|
@@ -142,12 +136,12 @@ declare const loginSim: {
|
|
|
142
136
|
|
|
143
137
|
declare const getUserCollect: (pacmtoken: string, page?: number, size?: number) => Promise<{
|
|
144
138
|
data: any;
|
|
145
|
-
|
|
139
|
+
newPacmToken: string;
|
|
146
140
|
}>;
|
|
147
141
|
|
|
148
142
|
declare const getUserMyList: (pacmtoken: string, queryType?: number, page?: number, size?: number) => Promise<{
|
|
149
143
|
data: any;
|
|
150
|
-
|
|
144
|
+
newPacmToken: string;
|
|
151
145
|
}>;
|
|
152
146
|
|
|
153
147
|
/**
|
|
@@ -232,6 +226,25 @@ declare const loginPhone: {
|
|
|
232
226
|
*/
|
|
233
227
|
declare const getMVRecommend: (mvContentId: string, page?: number) => Promise<any>;
|
|
234
228
|
|
|
229
|
+
declare const getPlaylistSquare: () => Promise<any>;
|
|
230
|
+
|
|
231
|
+
declare const searchLrc: (text: string, page?: number) => Promise<any>;
|
|
232
|
+
|
|
233
|
+
declare const getNinanSong: () => Promise<any>;
|
|
234
|
+
|
|
235
|
+
declare const getNinanByDate: (date: string) => Promise<any>;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* 获取电台推荐 (所有电台)
|
|
239
|
+
* 私人FM(上瘾电台、听见不同),时序电台,分类电台,乐游播客,YOU乐电台
|
|
240
|
+
* @param pacmtoken 可选-登录凭证,用于获取所有电台
|
|
241
|
+
* @returns
|
|
242
|
+
*/
|
|
243
|
+
declare const getRadioRecommendAll: (pacmtoken?: string) => Promise<{
|
|
244
|
+
data: any;
|
|
245
|
+
newPacmToken: string;
|
|
246
|
+
}>;
|
|
247
|
+
|
|
235
248
|
/**
|
|
236
249
|
* modules 子目录统一入口
|
|
237
250
|
* 汇总导出所有 API 函数
|
|
@@ -246,11 +259,15 @@ declare const api_getComment: typeof getComment;
|
|
|
246
259
|
declare const api_getMVRecommend: typeof getMVRecommend;
|
|
247
260
|
declare const api_getMvHls: typeof getMvHls;
|
|
248
261
|
declare const api_getMvInfo: typeof getMvInfo;
|
|
262
|
+
declare const api_getNinanByDate: typeof getNinanByDate;
|
|
263
|
+
declare const api_getNinanSong: typeof getNinanSong;
|
|
249
264
|
declare const api_getOpNum: typeof getOpNum;
|
|
250
265
|
declare const api_getPacmToken: typeof getPacmToken;
|
|
251
266
|
declare const api_getPlaylistInfo: typeof getPlaylistInfo;
|
|
252
267
|
declare const api_getPlaylistSong: typeof getPlaylistSong;
|
|
268
|
+
declare const api_getPlaylistSquare: typeof getPlaylistSquare;
|
|
253
269
|
declare const api_getRadioRecommend: typeof getRadioRecommend;
|
|
270
|
+
declare const api_getRadioRecommendAll: typeof getRadioRecommendAll;
|
|
254
271
|
declare const api_getRankIndex: typeof getRankIndex;
|
|
255
272
|
declare const api_getRankInfo: typeof getRankInfo;
|
|
256
273
|
declare const api_getRecommendPlaylist: typeof getRecommendPlaylist;
|
|
@@ -282,6 +299,7 @@ declare const api_loginSim: typeof loginSim;
|
|
|
282
299
|
declare const api_queryUserInfo: typeof queryUserInfo;
|
|
283
300
|
declare const api_searchAlbum: typeof searchAlbum;
|
|
284
301
|
declare const api_searchConcert: typeof searchConcert;
|
|
302
|
+
declare const api_searchLrc: typeof searchLrc;
|
|
285
303
|
declare const api_searchRbt: typeof searchRbt;
|
|
286
304
|
declare const api_searchSinger: typeof searchSinger;
|
|
287
305
|
declare const api_searchSong: typeof searchSong;
|
|
@@ -289,7 +307,7 @@ declare const api_searchSuggest: typeof searchSuggest;
|
|
|
289
307
|
declare const api_searchTicket: typeof searchTicket;
|
|
290
308
|
declare const api_searchVideo: typeof searchVideo;
|
|
291
309
|
declare namespace api {
|
|
292
|
-
export { api_YDRZ as YDRZ, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_getAlbumInfo as getAlbumInfo, api_getAlbumSong as getAlbumSong, api_getComment as getComment, api_getMVRecommend as getMVRecommend, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPlaylistInfo as getPlaylistInfo, api_getPlaylistSong as getPlaylistSong, api_getRadioRecommend as getRadioRecommend, api_getRankIndex as getRankIndex, api_getRankInfo as getRankInfo, api_getRecommendPlaylist as getRecommendPlaylist, api_getResourceInfo as getResourceInfo, api_getSceneRecommend as getSceneRecommend, api_getSearchDefault as getSearchDefault, api_getSearchHot as getSearchHot, api_getSearchSingerTab as getSearchSingerTab, api_getSearchSingerTabList as getSearchSingerTabList, api_getSimilarSongRecommend as getSimilarSongRecommend, api_getSingerAlbum as getSingerAlbum, api_getSingerIndex as getSingerIndex, api_getSingerSimilar as getSingerSimilar, api_getSingerSong as getSingerSong, api_getTicketInfo as getTicketInfo, api_getTodayRecommend as getTodayRecommend, api_getUrlH5V24 as getUrlH5V24, api_getUrlV1 as getUrlV1, api_getUrlV2 as getUrlV2, api_getUserBadge as getUserBadge, api_getUserCollect as getUserCollect, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getVersion as getVersion, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_queryUserInfo as queryUserInfo, api_searchAlbum as searchAlbum, api_searchConcert as searchConcert, api_searchRbt as searchRbt, api_searchSinger as searchSinger, api_searchSong as searchSong, api_searchSuggest as searchSuggest, api_searchTicket as searchTicket, api_searchVideo as searchVideo };
|
|
310
|
+
export { api_YDRZ as YDRZ, api_checkCanListen as checkCanListen, api_checkToken as checkToken, api_getAlbumInfo as getAlbumInfo, api_getAlbumSong as getAlbumSong, api_getComment as getComment, api_getMVRecommend as getMVRecommend, api_getMvHls as getMvHls, api_getMvInfo as getMvInfo, api_getNinanByDate as getNinanByDate, api_getNinanSong as getNinanSong, api_getOpNum as getOpNum, api_getPacmToken as getPacmToken, api_getPlaylistInfo as getPlaylistInfo, api_getPlaylistSong as getPlaylistSong, api_getPlaylistSquare as getPlaylistSquare, api_getRadioRecommend as getRadioRecommend, api_getRadioRecommendAll as getRadioRecommendAll, api_getRankIndex as getRankIndex, api_getRankInfo as getRankInfo, api_getRecommendPlaylist as getRecommendPlaylist, api_getResourceInfo as getResourceInfo, api_getSceneRecommend as getSceneRecommend, api_getSearchDefault as getSearchDefault, api_getSearchHot as getSearchHot, api_getSearchSingerTab as getSearchSingerTab, api_getSearchSingerTabList as getSearchSingerTabList, api_getSimilarSongRecommend as getSimilarSongRecommend, api_getSingerAlbum as getSingerAlbum, api_getSingerIndex as getSingerIndex, api_getSingerSimilar as getSingerSimilar, api_getSingerSong as getSingerSong, api_getTicketInfo as getTicketInfo, api_getTodayRecommend as getTodayRecommend, api_getUrlH5V24 as getUrlH5V24, api_getUrlV1 as getUrlV1, api_getUrlV2 as getUrlV2, api_getUserBadge as getUserBadge, api_getUserCollect as getUserCollect, api_getUserHomePage as getUserHomePage, api_getUserMyList as getUserMyList, api_getVersion as getVersion, api_loginNP as loginNP, api_loginOneClick as loginOneClick, api_loginPhone as loginPhone, api_loginSim as loginSim, api_queryUserInfo as queryUserInfo, api_searchAlbum as searchAlbum, api_searchConcert as searchConcert, api_searchLrc as searchLrc, api_searchRbt as searchRbt, api_searchSinger as searchSinger, api_searchSong as searchSong, api_searchSuggest as searchSuggest, api_searchTicket as searchTicket, api_searchVideo as searchVideo };
|
|
293
311
|
}
|
|
294
312
|
|
|
295
313
|
declare const ua: string[];
|
|
@@ -300,7 +318,7 @@ declare function getDeviceId(a?: number, b?: number): string;
|
|
|
300
318
|
declare const getPublicKey: () => Promise<{
|
|
301
319
|
publicExponent: string;
|
|
302
320
|
modulus: string;
|
|
303
|
-
}
|
|
321
|
+
}>;
|
|
304
322
|
|
|
305
323
|
declare class RSAKey {
|
|
306
324
|
private publicKey;
|
|
@@ -335,4 +353,4 @@ declare function createClient(): typeof api;
|
|
|
335
353
|
/** 客户端类型 */
|
|
336
354
|
type MiguClient = ReturnType<typeof createClient>;
|
|
337
355
|
|
|
338
|
-
export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, checkCanListen, checkToken, createClient, getAlbumInfo, getAlbumSong, getComment, getDeviceId, getMVRecommend, getMvHls, getMvInfo, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPublicKey, getRadioRecommend, getRankIndex, getRankInfo, getRecommendPlaylist, getResourceInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollect, getUserHomePage, getUserMyList, getVersion, loginNP, loginOneClick, loginPhone, loginSim, api as modules, queryUserInfo, randomUA, searchAlbum, searchConcert, searchRbt, searchSinger, searchSong, searchSuggest, searchTicket, searchVideo, ua };
|
|
356
|
+
export { type MiguClient, index as MiguUtils, RSAKey, URLParams, YDRZ, checkCanListen, checkToken, createClient, getAlbumInfo, getAlbumSong, getComment, getDeviceId, getMVRecommend, getMvHls, getMvInfo, getNinanByDate, getNinanSong, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, getPlaylistSquare, getPublicKey, getRadioRecommend, getRadioRecommendAll, getRankIndex, getRankInfo, getRecommendPlaylist, getResourceInfo, getSceneRecommend, getSearchDefault, getSearchHot, getSearchSingerTab, getSearchSingerTabList, getSimilarSongRecommend, getSingerAlbum, getSingerIndex, getSingerSimilar, getSingerSong, getTicketInfo, getTodayRecommend, getUrlH5V24, getUrlV1, getUrlV2, getUserBadge, getUserCollect, getUserHomePage, getUserMyList, getVersion, loginNP, loginOneClick, loginPhone, loginSim, api as modules, queryUserInfo, randomUA, searchAlbum, searchConcert, searchLrc, searchRbt, searchSinger, searchSong, searchSuggest, searchTicket, searchVideo, ua };
|