migu-api-enhanced 2.23.0 → 2.25.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 CHANGED
@@ -5,9 +5,9 @@
5
5
 
6
6
  ## API 接口
7
7
 
8
- - **搜索** - 歌曲、歌手、专辑、MV、歌词、短视频、彩铃、演唱会、票务、热门搜索、搜索建议
8
+ - **搜索** - 歌曲、歌单、歌手、专辑、MV、歌词、短视频、彩铃、演唱会、票务、热门搜索、搜索建议
9
9
  - **专辑** - 详情、歌曲列表
10
- - **歌单** - 信息、列表歌曲、歌单广场、电台歌曲列表、匹配外部歌单、VIP热歌
10
+ - **歌单** - 信息、列表歌曲、歌单广场(标签,分类)、电台歌曲列表、匹配外部歌单、VIP热歌
11
11
  - **歌手** - 歌手信息、歌手歌曲、歌手专辑、相似歌手、情书、歌手MV页
12
12
  - **播放地址** - 多版本播放地址接口(301/m2/v1/v2/v2.4)、数据库URL、咪咕云盘、云盘下载、下载v1
13
13
  - **推荐** - 歌曲、歌单、相似歌曲、主页电台、所有电台、畅听模式
@@ -16,9 +16,9 @@
16
16
  - **演唱会** - 简略信息、详情、推荐、播放地址 (m3u8)、评论、推荐MV
17
17
  - **视频** - 短视频:播放地址、搜索建议、推荐、用户信息、用户作品。 视频彩铃:播放地址、统计信息
18
18
  - **资源** - 获取歌词、资源信息、播放次数、检查可听性、lrc歌词
19
- - **用户** - 个人信息、手机号信息、我的主页、徽章、我喜欢、收藏、自建歌单管理、今日推荐、关注操作、用户简介、用户主页-歌曲、听歌排行、咪咕云盘、心动模式、表态、消息互动通知、评论(删除)
19
+ - **用户** - 个人信息、手机号信息、我的主页、徽章、我喜欢、收藏、自建歌单管理、今日推荐、关注操作、用户简介、用户主页-歌曲、听歌排行、咪咕云盘、心动模式、表态、消息互动通知、评论(删除)、查询(手机号,已购歌曲)
20
20
  - **登录认证** - 手机号登录、短信登录、(一键登录,帐密登录)
21
- - **活动** - 呢喃(歌曲列表、日期歌曲、签到、签到记录)、AI豆(签到、数量、签到状态、兑换)
21
+ - **活动** - 官方活动、呢喃(歌曲列表、日期歌曲、签到、签到记录)、AI豆(签到、数量、签到状态、兑换)
22
22
 
23
23
  更新于 [API 文档](https://domdkw.github.io/miguMusic-api-enhanced/)
24
24
 
package/dist/index.cjs CHANGED
@@ -47,6 +47,7 @@ __export(index_exports, {
47
47
  dislikeSong: () => dislikeSong,
48
48
  editUserMyList: () => editUserMyList,
49
49
  emojiAction: () => emojiAction,
50
+ getActivities: () => getActivities,
50
51
  getAiBeanCount: () => getAiBeanCount,
51
52
  getAiBeanSignStatus: () => getAiBeanSignStatus,
52
53
  getAlbumInfo: () => getAlbumInfo,
@@ -88,7 +89,6 @@ __export(index_exports, {
88
89
  getPageTab: () => getPageTab,
89
90
  getPlaylistInfo: () => getPlaylistInfo,
90
91
  getPlaylistSong: () => getPlaylistSong,
91
- getPlaylistSquarePage: () => getPlaylistSquarePage,
92
92
  getPublicKey: () => getPublicKey,
93
93
  getQuality: () => getQuality,
94
94
  getRadioRecommend: () => getRadioRecommend,
@@ -118,6 +118,11 @@ __export(index_exports, {
118
118
  getSingerMv: () => getSingerMv,
119
119
  getSingerSimilar: () => getSingerSimilar,
120
120
  getSingerSong: () => getSingerSong,
121
+ getSongInfo: () => getSongInfo,
122
+ getSquareListByTag: () => getSquareListByTag,
123
+ getSquarePage: () => getSquarePage,
124
+ getSquareRecommend: () => getSquareRecommend,
125
+ getSquareTag: () => getSquareTag,
121
126
  getThumbsMsg: () => getThumbsMsg,
122
127
  getTicketInfo: () => getTicketInfo,
123
128
  getTodayRecommend: () => getTodayRecommend,
@@ -132,6 +137,7 @@ __export(index_exports, {
132
137
  getUserHeartthrob: () => getUserHeartthrob,
133
138
  getUserHomePage: () => getUserHomePage,
134
139
  getUserMyList: () => getUserMyList,
140
+ getUserOrdered: () => getUserOrdered,
135
141
  getUserPhoneInfo: () => getUserPhoneInfo,
136
142
  getUserSongPage: () => getUserSongPage,
137
143
  getVersion: () => getVersion,
@@ -159,6 +165,7 @@ __export(index_exports, {
159
165
  searchConcert: () => searchConcert,
160
166
  searchLrc: () => searchLrc,
161
167
  searchMv: () => searchMv,
168
+ searchPlaylist: () => searchPlaylist,
162
169
  searchRbt: () => searchRbt,
163
170
  searchSVideo: () => searchSVideo,
164
171
  searchSinger: () => searchSinger,
@@ -189,6 +196,7 @@ __export(modules_exports, {
189
196
  dislikeSong: () => dislikeSong,
190
197
  editUserMyList: () => editUserMyList,
191
198
  emojiAction: () => emojiAction,
199
+ getActivities: () => getActivities,
192
200
  getAiBeanCount: () => getAiBeanCount,
193
201
  getAiBeanSignStatus: () => getAiBeanSignStatus,
194
202
  getAlbumInfo: () => getAlbumInfo,
@@ -229,7 +237,6 @@ __export(modules_exports, {
229
237
  getPageTab: () => getPageTab,
230
238
  getPlaylistInfo: () => getPlaylistInfo,
231
239
  getPlaylistSong: () => getPlaylistSong,
232
- getPlaylistSquarePage: () => getPlaylistSquarePage,
233
240
  getRadioRecommend: () => getRadioRecommend,
234
241
  getRadioRecommendAll: () => getRadioRecommendAll,
235
242
  getRadioSong: () => getRadioSong,
@@ -256,6 +263,11 @@ __export(modules_exports, {
256
263
  getSingerMv: () => getSingerMv,
257
264
  getSingerSimilar: () => getSingerSimilar,
258
265
  getSingerSong: () => getSingerSong,
266
+ getSongInfo: () => getSongInfo,
267
+ getSquareListByTag: () => getSquareListByTag,
268
+ getSquarePage: () => getSquarePage,
269
+ getSquareRecommend: () => getSquareRecommend,
270
+ getSquareTag: () => getSquareTag,
259
271
  getThumbsMsg: () => getThumbsMsg,
260
272
  getTicketInfo: () => getTicketInfo,
261
273
  getTodayRecommend: () => getTodayRecommend,
@@ -270,6 +282,7 @@ __export(modules_exports, {
270
282
  getUserHeartthrob: () => getUserHeartthrob,
271
283
  getUserHomePage: () => getUserHomePage,
272
284
  getUserMyList: () => getUserMyList,
285
+ getUserOrdered: () => getUserOrdered,
273
286
  getUserPhoneInfo: () => getUserPhoneInfo,
274
287
  getUserSongPage: () => getUserSongPage,
275
288
  getVersion: () => getVersion,
@@ -294,6 +307,7 @@ __export(modules_exports, {
294
307
  searchConcert: () => searchConcert,
295
308
  searchLrc: () => searchLrc,
296
309
  searchMv: () => searchMv,
310
+ searchPlaylist: () => searchPlaylist,
297
311
  searchRbt: () => searchRbt,
298
312
  searchSVideo: () => searchSVideo,
299
313
  searchSinger: () => searchSinger,
@@ -401,6 +415,11 @@ var searchSong = async (text, page = 1) => {
401
415
  return await h5fetch(`http://app.c.nf.migu.cn/bmw/search/song/v1.0?pageNo=${page}&text=${text}`);
402
416
  };
403
417
 
418
+ // src/modules/search_playlist.ts
419
+ var searchPlaylist = async (text, page = 1, typeOrder = 0) => {
420
+ return await h5fetch(`https://app.c.nf.migu.cn/bmw/search/music-list/v1.0?pageNo=${page}&text=${text}&typeOrder=${typeOrder}`);
421
+ };
422
+
404
423
  // src/modules/search_album.ts
405
424
  var searchAlbum = async (text, page = 1, typeOrder = 0) => {
406
425
  return await h5fetch(`http://app.c.nf.migu.cn/bmw/search/album/v1.0?pageNo=${page}&text=${text}&typeOrder=${typeOrder}`);
@@ -1424,7 +1443,7 @@ var getMVRecommend = async (mvContentId, page = 1) => {
1424
1443
  };
1425
1444
 
1426
1445
  // src/modules/playlist_square_page.ts
1427
- var getPlaylistSquarePage = async () => {
1446
+ var getSquarePage = async () => {
1428
1447
  return await h5fetch(`https://app.c.nf.migu.cn/pc/bmw/page-data/playlist-square-recommend/v1.0?templateVersion=2`);
1429
1448
  };
1430
1449
 
@@ -2371,6 +2390,65 @@ var getListenFreelySongs = async (pacmtoken, modelId = "701000") => {
2371
2390
  return { data, newPacmToken: cookies.pacmtoken || "" };
2372
2391
  };
2373
2392
 
2393
+ // src/modules/playlist_square_listByTag.ts
2394
+ var getSquareListByTag = async (tagId, page) => {
2395
+ const res = await h5fetch(`http://app.c.nf.migu.cn/MIGUM3.0/v1.0/template/musiclistplaza-listbytag?templateVersion=1&tagId=${tagId}&pageNumber=${page}`);
2396
+ res.data.contentItemList = res?.data?.contentItemList?.itemList?.reduce((acc, item) => {
2397
+ if (!item.actionUrl || !item.actionUrl.includes("song-list-info")) {
2398
+ return acc;
2399
+ }
2400
+ item.playlistId = item.actionUrl.split("id=")[1].split("&")[0] || "";
2401
+ acc.push(item);
2402
+ return acc;
2403
+ }, []) || [];
2404
+ res.data.hasNext = res.data.contentItemList.length < 30 ? false : res?.data?.nextPageUrl !== void 0 && res?.data?.nextPageUrl !== "";
2405
+ return res;
2406
+ };
2407
+
2408
+ // src/modules/playlist_square_recommend.ts
2409
+ var getSquareRecommend = async () => {
2410
+ return await h5fetch(`https://app.c.nf.migu.cn/pc/bmw/playlist-square/recommend-playlist/v1.0?templateVersion=2`);
2411
+ };
2412
+
2413
+ // src/modules/playlist_square_tag.ts
2414
+ var getSquareTag = async (needMoreTag = true) => {
2415
+ const baseTag = await h5fetch(`https://app.c.nf.migu.cn/pc/bmw/playlist-square/tab/v1.0`);
2416
+ if (!needMoreTag) {
2417
+ return baseTag;
2418
+ }
2419
+ const moreTag = await h5fetch(`https://app.c.nf.migu.cn/pc/v1.0/template/musiclistplaza-taglist/release`);
2420
+ baseTag.data.moreTag = moreTag.data.map((item) => {
2421
+ const title = item?.header?.title;
2422
+ const tagList = item?.content.map((it) => ({
2423
+ tagName: it.texts[0],
2424
+ tagId: it.texts[1]
2425
+ }));
2426
+ return { title, tagList };
2427
+ });
2428
+ return baseTag;
2429
+ };
2430
+
2431
+ // src/modules/resourceinfo_song.ts
2432
+ var getSongInfo = async (contentIds) => {
2433
+ contentIds = contentIds.replace(/,/g, "|");
2434
+ return await h5fetch(`https://app.c.nf.migu.cn/resource/song/by-contentids/v2.0?contentId=${contentIds}`);
2435
+ };
2436
+
2437
+ // src/modules/activities.ts
2438
+ var getActivities = async () => {
2439
+ return await h5fetch(`https://app.u.nf.migu.cn/MIGUM3.0/v1.0/template/index-activity/release`);
2440
+ };
2441
+
2442
+ // src/modules/user_ordered.ts
2443
+ var getUserOrdered = async (pacmtoken) => {
2444
+ if (!pacmtoken) return { data: { success: false, code: "290001", info: "\u8BF7\u5148\u767B\u5F55" }, newPacmToken: void 0 };
2445
+ const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/MIGUM3.0/strategy/song-ordered/v2.0", {
2446
+ cookie: { pacmtoken },
2447
+ headers: { "channel": "014X031" }
2448
+ });
2449
+ return { data, newPacmToken: cookies.pacmtoken || "" };
2450
+ };
2451
+
2374
2452
  // src/utils/index.ts
2375
2453
  var utils_exports = {};
2376
2454
  __export(utils_exports, {
@@ -2438,6 +2516,7 @@ function createClient() {
2438
2516
  dislikeSong,
2439
2517
  editUserMyList,
2440
2518
  emojiAction,
2519
+ getActivities,
2441
2520
  getAiBeanCount,
2442
2521
  getAiBeanSignStatus,
2443
2522
  getAlbumInfo,
@@ -2479,7 +2558,6 @@ function createClient() {
2479
2558
  getPageTab,
2480
2559
  getPlaylistInfo,
2481
2560
  getPlaylistSong,
2482
- getPlaylistSquarePage,
2483
2561
  getPublicKey,
2484
2562
  getQuality,
2485
2563
  getRadioRecommend,
@@ -2509,6 +2587,11 @@ function createClient() {
2509
2587
  getSingerMv,
2510
2588
  getSingerSimilar,
2511
2589
  getSingerSong,
2590
+ getSongInfo,
2591
+ getSquareListByTag,
2592
+ getSquarePage,
2593
+ getSquareRecommend,
2594
+ getSquareTag,
2512
2595
  getThumbsMsg,
2513
2596
  getTicketInfo,
2514
2597
  getTodayRecommend,
@@ -2523,6 +2606,7 @@ function createClient() {
2523
2606
  getUserHeartthrob,
2524
2607
  getUserHomePage,
2525
2608
  getUserMyList,
2609
+ getUserOrdered,
2526
2610
  getUserPhoneInfo,
2527
2611
  getUserSongPage,
2528
2612
  getVersion,
@@ -2550,6 +2634,7 @@ function createClient() {
2550
2634
  searchConcert,
2551
2635
  searchLrc,
2552
2636
  searchMv,
2637
+ searchPlaylist,
2553
2638
  searchRbt,
2554
2639
  searchSVideo,
2555
2640
  searchSinger,