migu-api-enhanced 2.22.0 → 2.23.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
@@ -1,7 +1,7 @@
1
1
  # migu-api-enhanced
2
2
 
3
- ![migu-api-enhanced](https://img.shields.io/npm/v/migu-api-enhanced?style=for-the-badge&logo=npm) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Domdkw/miguMusic-api-enhanced/bun-release.yml?style=for-the-badge&logo=github&link=https%3A%2F%2Fgithub.com%2FDomdkw%2FmiguMusic-api-enhanced%2Factions%2Fworkflows%2Fbun-release.yml)
4
- 基于 Hono 框架的咪咕音乐 API 服务,支持多平台部署。受[https://github.com/jsososo/MiguMusicApi](https://github.com/jsososo/MiguMusicApi)项目启发。
3
+ ![migu-api-enhanced](https://img.shields.io/npm/v/migu-api-enhanced?style=for-the-badge&logo=npm&link=https%3A%2F%2Fwww.npmjs.com%2Fpackage%2Fmigu-api-enhanced) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Domdkw/miguMusic-api-enhanced/bun-release.yml?style=for-the-badge&logo=github&link=https%3A%2F%2Fgithub.com%2FDomdkw%2FmiguMusic-api-enhanced%2Factions%2Fworkflows%2Fbun-release.yml)
4
+ 基于 Hono 框架的咪咕音乐 API 服务,支持多平台部署。受[jsososo/MiguMusicApi](https://github.com/jsososo/MiguMusicApi)和[NeteaseCloudMusicApiEnhanced](https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced)项目启发。
5
5
 
6
6
  ## API 接口
7
7
 
@@ -9,14 +9,14 @@
9
9
  - **专辑** - 详情、歌曲列表
10
10
  - **歌单** - 信息、列表歌曲、歌单广场、电台歌曲列表、匹配外部歌单、VIP热歌
11
11
  - **歌手** - 歌手信息、歌手歌曲、歌手专辑、相似歌手、情书、歌手MV页
12
- - **播放地址** - 多版本播放地址接口(301/m2/v1/v2/v2.4)、数据库URL、咪咕云盘、下载v1
13
- - **推荐** - 歌曲、歌单、相似歌曲、主页电台、所有电台
12
+ - **播放地址** - 多版本播放地址接口(301/m2/v1/v2/v2.4)、数据库URL、咪咕云盘、云盘下载、下载v1
13
+ - **推荐** - 歌曲、歌单、相似歌曲、主页电台、所有电台、畅听模式
14
14
  - **栏目** - 排行榜(Tab/内容)、新歌速递、新碟上架、栏目内容、主页Tab、界面信息
15
15
  - **MV** - MV详情、MV推荐、MV播放地址 (mp4 & m3u8)、歌曲MV
16
16
  - **演唱会** - 简略信息、详情、推荐、播放地址 (m3u8)、评论、推荐MV
17
17
  - **视频** - 短视频:播放地址、搜索建议、推荐、用户信息、用户作品。 视频彩铃:播放地址、统计信息
18
18
  - **资源** - 获取歌词、资源信息、播放次数、检查可听性、lrc歌词
19
- - **用户** - 个人信息、我的主页、徽章、我喜欢、收藏、自建歌单管理、今日推荐、关注操作、用户简介、用户主页-歌曲、听歌排行、咪咕云盘、心动模式、表态、消息互动通知、评论(删除)
19
+ - **用户** - 个人信息、手机号信息、我的主页、徽章、我喜欢、收藏、自建歌单管理、今日推荐、关注操作、用户简介、用户主页-歌曲、听歌排行、咪咕云盘、心动模式、表态、消息互动通知、评论(删除)
20
20
  - **登录认证** - 手机号登录、短信登录、(一键登录,帐密登录)
21
21
  - **活动** - 呢喃(歌曲列表、日期歌曲、签到、签到记录)、AI豆(签到、数量、签到状态、兑换)
22
22
 
package/dist/index.cjs CHANGED
@@ -51,6 +51,7 @@ __export(index_exports, {
51
51
  getAiBeanSignStatus: () => getAiBeanSignStatus,
52
52
  getAlbumInfo: () => getAlbumInfo,
53
53
  getAlbumSong: () => getAlbumSong,
54
+ getCloudDLUrl: () => getCloudDLUrl,
54
55
  getCloudUploadUrl: () => getCloudUploadUrl,
55
56
  getCloudUrl: () => getCloudUrl,
56
57
  getColumnInfo: () => getColumnInfo,
@@ -67,6 +68,8 @@ __export(index_exports, {
67
68
  getFollowingList: () => getFollowingList,
68
69
  getFollowingVra: () => getFollowingVra,
69
70
  getInteractionMsg: () => getInteractionMsg,
71
+ getListenFreelySongs: () => getListenFreelySongs,
72
+ getListenFreelyTab: () => getListenFreelyTab,
70
73
  getListenRank: () => getListenRank,
71
74
  getLyric: () => getLyric,
72
75
  getMVRecommend: () => getMVRecommend,
@@ -129,6 +132,7 @@ __export(index_exports, {
129
132
  getUserHeartthrob: () => getUserHeartthrob,
130
133
  getUserHomePage: () => getUserHomePage,
131
134
  getUserMyList: () => getUserMyList,
135
+ getUserPhoneInfo: () => getUserPhoneInfo,
132
136
  getUserSongPage: () => getUserSongPage,
133
137
  getVersion: () => getVersion,
134
138
  getVipPlaylist: () => getVipPlaylist,
@@ -189,6 +193,7 @@ __export(modules_exports, {
189
193
  getAiBeanSignStatus: () => getAiBeanSignStatus,
190
194
  getAlbumInfo: () => getAlbumInfo,
191
195
  getAlbumSong: () => getAlbumSong,
196
+ getCloudDLUrl: () => getCloudDLUrl,
192
197
  getCloudUploadUrl: () => getCloudUploadUrl,
193
198
  getCloudUrl: () => getCloudUrl,
194
199
  getColumnInfo: () => getColumnInfo,
@@ -204,6 +209,8 @@ __export(modules_exports, {
204
209
  getFollowingList: () => getFollowingList,
205
210
  getFollowingVra: () => getFollowingVra,
206
211
  getInteractionMsg: () => getInteractionMsg,
212
+ getListenFreelySongs: () => getListenFreelySongs,
213
+ getListenFreelyTab: () => getListenFreelyTab,
207
214
  getListenRank: () => getListenRank,
208
215
  getLyric: () => getLyric,
209
216
  getMVRecommend: () => getMVRecommend,
@@ -263,6 +270,7 @@ __export(modules_exports, {
263
270
  getUserHeartthrob: () => getUserHeartthrob,
264
271
  getUserHomePage: () => getUserHomePage,
265
272
  getUserMyList: () => getUserMyList,
273
+ getUserPhoneInfo: () => getUserPhoneInfo,
266
274
  getUserSongPage: () => getUserSongPage,
267
275
  getVersion: () => getVersion,
268
276
  getVipPlaylist: () => getVipPlaylist,
@@ -2320,6 +2328,49 @@ var redeemAiBean = async (pacmtoken) => {
2320
2328
  return { data, newPacmToken: cookies.pacmtoken || "" };
2321
2329
  };
2322
2330
 
2331
+ // src/modules/cloud_dl.ts
2332
+ var getCloudDLUrl = async (pacmtoken, contentId, toneFlag = "PQ") => {
2333
+ const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/MIGUM3.0/strategy/cloud/download-url/v1.0", {
2334
+ cookie: { pacmtoken },
2335
+ headers: { "channel": "0146931", "version": "7.41.13" },
2336
+ params: {
2337
+ contentId,
2338
+ "formatType": toneFlag,
2339
+ "type": "0"
2340
+ }
2341
+ });
2342
+ return { data, newPacmToken: cookies.pacmtoken || "" };
2343
+ };
2344
+
2345
+ // src/modules/user_phoneInfo.ts
2346
+ var getUserPhoneInfo = async (pacmtoken) => {
2347
+ const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/MIGUM2.0/v1.0/tone/isrbtuser.do", {
2348
+ cookie: { pacmtoken },
2349
+ headers: {
2350
+ "channel": "0146921",
2351
+ "version": "8.8.0"
2352
+ }
2353
+ });
2354
+ return { data, newPacmToken: cookies.pacmtoken || "" };
2355
+ };
2356
+
2357
+ // src/modules/recommend_listenFreely_tab.ts
2358
+ var getListenFreelyTab = async (pacmtoken = "") => {
2359
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/bmw/page/view/listen-freely/v1.0`, {
2360
+ cookie: pacmtoken ? { pacmtoken } : void 0
2361
+ });
2362
+ return { data, newPacmToken: cookies.pacmtoken || void 0 };
2363
+ };
2364
+
2365
+ // src/modules/recommend_listenFreely.ts
2366
+ var getListenFreelySongs = async (pacmtoken, modelId = "701000") => {
2367
+ if (!pacmtoken) return { data: { success: false, code: "290001", info: "\u8BF7\u5148\u767B\u5F55" }, newPacmToken: void 0 };
2368
+ const { data, cookies } = await ckfetch(`http://app.c.nf.migu.cn/resource-dataloader/recommend/listen-freely/v2.0?modelId=${modelId}`, {
2369
+ cookie: { pacmtoken }
2370
+ });
2371
+ return { data, newPacmToken: cookies.pacmtoken || "" };
2372
+ };
2373
+
2323
2374
  // src/utils/index.ts
2324
2375
  var utils_exports = {};
2325
2376
  __export(utils_exports, {
@@ -2391,6 +2442,7 @@ function createClient() {
2391
2442
  getAiBeanSignStatus,
2392
2443
  getAlbumInfo,
2393
2444
  getAlbumSong,
2445
+ getCloudDLUrl,
2394
2446
  getCloudUploadUrl,
2395
2447
  getCloudUrl,
2396
2448
  getColumnInfo,
@@ -2407,6 +2459,8 @@ function createClient() {
2407
2459
  getFollowingList,
2408
2460
  getFollowingVra,
2409
2461
  getInteractionMsg,
2462
+ getListenFreelySongs,
2463
+ getListenFreelyTab,
2410
2464
  getListenRank,
2411
2465
  getLyric,
2412
2466
  getMVRecommend,
@@ -2469,6 +2523,7 @@ function createClient() {
2469
2523
  getUserHeartthrob,
2470
2524
  getUserHomePage,
2471
2525
  getUserMyList,
2526
+ getUserPhoneInfo,
2472
2527
  getUserSongPage,
2473
2528
  getVersion,
2474
2529
  getVipPlaylist,