From 35e1807c4c9353756bc5d57a1958f47d1e8fbf5f Mon Sep 17 00:00:00 2001 From: binaryify Date: Fri, 26 Jan 2024 16:02:57 +0800 Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E6=96=B0=E5=A2=9E=E7=A7=81?= =?UTF-8?q?=E4=BA=BA=20FM=20=E6=A8=A1=E5=BC=8F=E9=80=89=E6=8B=A9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 3 +++ README.MD | 17 ++++++++++++++--- module/personal_fm_mode.js | 24 ++++++++++++++++++++++++ package.json | 2 +- public/docs/README.md | 15 +++++++++++++++ 5 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 module/personal_fm_mode.js diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 4a1feba..b9206eb 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,7 @@ # 更新日志 +### 4.14.2 | 2024.01.23 +- 新增 `私人 FM 模式选择` 接口 + ### 4.14.2 | 2024.01.23 - 文档自启动 diff --git a/README.MD b/README.MD index 749069e..900c00e 100644 --- a/README.MD +++ b/README.MD @@ -61,6 +61,14 @@ windows 下使用 git-bash 或者 cmder 等终端执行以下命令: $ set PORT=4000 && node app.js ``` +## npx 方式运行 +可在终端直接执行 +```bash +npx NeteaseCloudMusicApi@latest +``` +使用此命令,可直接启动服务,无需下载或者 clone 项目 + + ## Vercel 部署 v4.0.8 加入了 Vercel 配置文件,可以直接在 Vercel 下部署了,不需要自己的服务器 @@ -406,10 +414,13 @@ banner({ type:0 }).then(res=>{ 268. 用户贡献条目、积分、云贝数量 269. 年度听歌报告 270. 播客声音搜索 +271. 播客声音排序 +272. 播客列表详情 +273. 本地歌曲文件匹配网易云歌曲信息 +274. 歌曲音质详情 +275. 歌曲红心数量 +276. 私人 FM 模式选择 -## 更新日志 - -[changelog](https://github.com/Binaryify/NeteaseCloudMusicApi/blob/master/CHANGELOG.MD) ## 单元测试 diff --git a/module/personal_fm_mode.js b/module/personal_fm_mode.js new file mode 100644 index 0000000..f0a949f --- /dev/null +++ b/module/personal_fm_mode.js @@ -0,0 +1,24 @@ +// 私人FM - 模式选择 + +// aidj, DEFAULT, FAMILIAR, EXPLORE, SCENE_RCMD ( EXERCISE, FOCUS, NIGHT_EMO ) +// 来不及解释这几个了 + +module.exports = (query, request) => { + const data = { + mode: query.mode, + subMode: query.submode, + limit: query.limit || 3, + } + return request( + 'POST', + `https://interface3.music.163.com/eapi/v1/radio/get`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/v1/radio/get', + }, + ) +} diff --git a/package.json b/package.json index a40fd75..f74753c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "4.14.2", + "version": "4.15.0", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js", diff --git a/public/docs/README.md b/public/docs/README.md index 012f4b4..4be9b10 100644 --- a/public/docs/README.md +++ b/public/docs/README.md @@ -291,6 +291,7 @@ 273. 本地歌曲文件匹配网易云歌曲信息 274. 歌曲音质详情 275. 歌曲红心数量 +276. 私人 FM 模式选择 ## 安装 @@ -4539,6 +4540,20 @@ qrCodeStatus:20,detailReason:0 验证成功qrCodeStatus:21,detailReason:0 二 **调用例子:** `/song/red/count?id=186016` +### 私人 FM 模式选择 + +说明: 调用此接口返回私人 FM 内容, 并可以选择模式 + +**必选参数:** + +`mode`: 模式 (aidj, DEFAULT, FAMILIAR, EXPLORE, SCENE_RCMD) + +**可选参数:** + +`submode`: 当 mode 为 SCENE_RCMD 是可为 ( EXERCISE, FOCUS, NIGHT_EMO ) + +**接口地址:** `/personal/fm/mode` + ## 离线访问此文档 此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问