From b7f8d9d3ff5374032fd52892968c7ce4ba9c8ea5 Mon Sep 17 00:00:00 2001 From: binaryify Date: Wed, 3 Jun 2020 21:35:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=AD=8C=E6=9B=B2=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 3 +++ docs/README.md | 27 ++++++++++++++++++++++----- module/song_order_update.js | 20 ++++++++++++++++++++ package.json | 2 +- 4 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 module/song_order_update.js diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 191574a..ebfc168 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,7 @@ # 更新日志 +### 3.32.1 | 2020.06.03 +- 新增歌曲排序接口 + ### 3.32.0 | 2020.06.03 - 更新排行榜接口,支持传入榜单id - 新增榜单顺序调整接口 [#806](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/806) diff --git a/docs/README.md b/docs/README.md index 6dff8ce..24b2f11 100644 --- a/docs/README.md +++ b/docs/README.md @@ -516,7 +516,8 @@ signature:用户签名 ### 更新歌单 说明 : 登陆后调用此接口,可以更新用户歌单 -参数: + +**必选参数 :** ``` id:歌单id @@ -534,8 +535,8 @@ tags:歌单tag ,多个用 `;` 隔开,只能用官方规定标签 ### 更新歌单描述 说明 : 登陆后调用此接口,可以单独更新用户歌单描述 -参数: +**必选参数 :** ``` id:歌单id @@ -548,7 +549,8 @@ desc:歌单描述 ### 更新歌单名 说明 : 登陆后调用此接口,可以单独更新用户歌单名 -参数: + +**必选参数 :** ``` id: 歌单id @@ -562,7 +564,8 @@ name: 歌单名 ### 更新歌单标签 说明 : 登陆后调用此接口,可以单独更新用户歌单标签 -参数: + +**必选参数 :** ``` id: 歌单id @@ -576,7 +579,8 @@ tags: 歌单标签 ### 调整歌单顺序 说明 : 登陆后调用此接口,可以根据歌单id顺序调整歌单顺序 -参数: + + **必选参数 :** `ids`: 歌单id列表 @@ -585,6 +589,19 @@ tags: 歌单标签 **调用例子 :** `/playlist/order/update?ids=[111,222]` +### 调整歌曲顺序 +说明 : 登陆后调用此接口,可以根据歌曲id顺序调整歌曲顺序 + + +**必选参数 :** +`pid`: 歌单id + +`ids`: 歌曲id列表 + +**接口地址 :** `/song/order/update` + +**调用例子 :** `/song/order/update?pid=2039116066&ids=[5268328,1219871]` + ### 获取用户电台 说明 : 登陆后调用此接口 , 传入用户 id, 可以获取用户电台 diff --git a/module/song_order_update.js b/module/song_order_update.js new file mode 100644 index 0000000..ad65e2a --- /dev/null +++ b/module/song_order_update.js @@ -0,0 +1,20 @@ +// 更新歌曲顺序 + +module.exports = (query, request) => { + const data = { + pid: query.pid, + trackIds: query.ids, + op: 'update', + } + + console.log(data) + return request( + 'POST', `http://interface.music.163.com/api/playlist/manipulate/tracks`, data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + url: '/api/playlist/desc/update' + } + ) +} \ No newline at end of file diff --git a/package.json b/package.json index 10d9c56..9fb2d83 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.32.0", + "version": "3.32.1", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",