migu-api-enhanced 1.2.5 → 2.0.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/dist/index.d.ts CHANGED
@@ -51,7 +51,8 @@ declare const getSceneRecommend: (scene?: string, size?: number) => Promise<any>
51
51
  */
52
52
  declare const getRadioRecommend: (type?: number) => Promise<any>;
53
53
 
54
- declare const getComment: (resourceId: string, resourceType?: number, size?: number, hotCommentStart?: number) => Promise<any>;
54
+ declare const getComment: (resourceId: string, resourceType?: number, // 2: 歌曲 D: MV
55
+ size?: number, hotCommentStart?: number) => Promise<any>;
55
56
 
56
57
  declare const getResourceInfo: (resourceId: string, resourceType?: number) => Promise<any>;
57
58
 
@@ -67,7 +68,7 @@ declare const getUrlH5V24: (contentId: string, copyrightId: string, resourceType
67
68
 
68
69
  declare const getVersion: (channel?: string, version?: string, ua?: string) => Promise<any>;
69
70
 
70
- declare const getMvInfo: (mvIds: string) => Promise<any>;
71
+ declare const getMvInfo: (mvContentId: string) => Promise<any>;
71
72
 
72
73
  declare const getMvHls: (mvContentId: string, mvCopyrightId: string, url: string, size: number, format?: string, needHttps?: boolean) => Promise<any>;
73
74
 
@@ -220,6 +221,17 @@ declare const loginOneClick: {
220
221
  }>;
221
222
  };
222
223
 
224
+ declare const loginPhone: {
225
+ getMsgCode(phone: string): Promise<any>;
226
+ authn(phone: string, msgCode: string): Promise<any>;
227
+ };
228
+
229
+ /**
230
+ * 获取相似歌曲推荐
231
+ * @param contentId 歌曲ID
232
+ */
233
+ declare const getMVRecommend: (mvContentId: string, page?: number) => Promise<any>;
234
+
223
235
  /**
224
236
  * modules 子目录统一入口
225
237
  * 汇总导出所有 API 函数
@@ -231,6 +243,7 @@ declare const api_checkToken: typeof checkToken;
231
243
  declare const api_getAlbumInfo: typeof getAlbumInfo;
232
244
  declare const api_getAlbumSong: typeof getAlbumSong;
233
245
  declare const api_getComment: typeof getComment;
246
+ declare const api_getMVRecommend: typeof getMVRecommend;
234
247
  declare const api_getMvHls: typeof getMvHls;
235
248
  declare const api_getMvInfo: typeof getMvInfo;
236
249
  declare const api_getOpNum: typeof getOpNum;
@@ -264,6 +277,7 @@ declare const api_getUserMyList: typeof getUserMyList;
264
277
  declare const api_getVersion: typeof getVersion;
265
278
  declare const api_loginNP: typeof loginNP;
266
279
  declare const api_loginOneClick: typeof loginOneClick;
280
+ declare const api_loginPhone: typeof loginPhone;
267
281
  declare const api_loginSim: typeof loginSim;
268
282
  declare const api_queryUserInfo: typeof queryUserInfo;
269
283
  declare const api_searchAlbum: typeof searchAlbum;
@@ -275,7 +289,36 @@ declare const api_searchSuggest: typeof searchSuggest;
275
289
  declare const api_searchTicket: typeof searchTicket;
276
290
  declare const api_searchVideo: typeof searchVideo;
277
291
  declare namespace api {
278
- 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_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_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 };
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 };
293
+ }
294
+
295
+ declare const ua: string[];
296
+ declare const randomUA: () => string;
297
+
298
+ declare function getDeviceId(a?: number, b?: number): string;
299
+
300
+ declare const getPublicKey: () => Promise<{
301
+ publicExponent: string;
302
+ modulus: string;
303
+ } | undefined>;
304
+
305
+ declare class RSAKey {
306
+ private publicKey;
307
+ setPublic(modulus: string, exponent: string): void;
308
+ encrypt(text: string): string | null;
309
+ }
310
+
311
+ declare function URLParams($: object | string): string;
312
+
313
+ type index_RSAKey = RSAKey;
314
+ declare const index_RSAKey: typeof RSAKey;
315
+ declare const index_URLParams: typeof URLParams;
316
+ declare const index_getDeviceId: typeof getDeviceId;
317
+ declare const index_getPublicKey: typeof getPublicKey;
318
+ declare const index_randomUA: typeof randomUA;
319
+ declare const index_ua: typeof ua;
320
+ declare namespace index {
321
+ export { index_RSAKey as RSAKey, index_URLParams as URLParams, index_getDeviceId as getDeviceId, index_getPublicKey as getPublicKey, index_randomUA as randomUA, index_ua as ua };
279
322
  }
280
323
 
281
324
  /**
@@ -292,4 +335,4 @@ declare function createClient(): typeof api;
292
335
  /** 客户端类型 */
293
336
  type MiguClient = ReturnType<typeof createClient>;
294
337
 
295
- export { type MiguClient, YDRZ, checkCanListen, checkToken, createClient, getAlbumInfo, getAlbumSong, getComment, getMvHls, getMvInfo, getOpNum, getPacmToken, getPlaylistInfo, getPlaylistSong, 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, loginSim, api as modules, queryUserInfo, searchAlbum, searchConcert, searchRbt, searchSinger, searchSong, searchSuggest, searchTicket, searchVideo };
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 };