From 0d4f4d671e96b3cbda2ec42c1af27d7632610a86 Mon Sep 17 00:00:00 2001 From: binaryify Date: Tue, 23 Nov 2021 19:44:35 +0800 Subject: [PATCH] =?UTF-8?q?v4.2.0=20=E6=96=B0=E5=A2=9E=E6=9C=80=E8=BF=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE-=E6=AD=8C=E6=9B=B2,=E6=9C=80=E8=BF=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE-=E8=A7=86=E9=A2=91,=E6=9C=80=E8=BF=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE-=E5=A3=B0=E9=9F=B3,=E6=9C=80=E8=BF=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE-=E6=AD=8C=E5=8D=95,=E6=9C=80=E8=BF=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE-=E4=B8=93=E8=BE=91,=E6=9C=80=E8=BF=91?= =?UTF-8?q?=E6=92=AD=E6=94=BE-=E6=92=AD=E5=AE=A2=E7=AD=89=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 | 5 +++ README.MD | 6 +++ docs/README.md | 73 +++++++++++++++++++++++++++++++- interface.d.ts | 36 ++++++++++++++++ module/record_recent_album.js | 16 +++++++ module/record_recent_dj.js | 16 +++++++ module/record_recent_playlist.js | 16 +++++++ module/record_recent_song.js | 16 +++++++ module/record_recent_video.js | 16 +++++++ module/record_recent_voice.js | 16 +++++++ package.json | 2 +- 11 files changed, 215 insertions(+), 3 deletions(-) create mode 100644 module/record_recent_album.js create mode 100644 module/record_recent_dj.js create mode 100644 module/record_recent_playlist.js create mode 100644 module/record_recent_song.js create mode 100644 module/record_recent_video.js create mode 100644 module/record_recent_voice.js diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 4a469e0..17697f5 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,9 @@ # 更新日志 +### 4.2.0 | 2021.11.23 + +- 合并相同接口(发送文本动态,使用`/share/resource`接口代替);增加歌手视频接口;增加创建共享歌单的用法 [#1402](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/1402) + +- 新增最近播放-歌曲,最近播放-视频,最近播放-声音,最近播放-歌单,最近播放-专辑,最近播放-播客等接口 ### 4.1.1 | 2021.11.20 diff --git a/README.MD b/README.MD index 7ac5454..0a7dcae 100644 --- a/README.MD +++ b/README.MD @@ -349,6 +349,12 @@ banner({ type:0 }).then(res=>{ 227. 获取客户端歌曲下载 url 228. 获取歌单所有歌曲 229. 乐签信息 +230. 最近播放-歌曲 +231. 最近播放-视频 +232. 最近播放-声音 +233. 最近播放-歌单 +234. 最近播放-专辑 +235. 最近播放-播客 ## 更新日志 diff --git a/docs/README.md b/docs/README.md index 2b54ab7..7554f36 100644 --- a/docs/README.md +++ b/docs/README.md @@ -245,6 +245,13 @@ 227. 获取歌单所有歌曲 228. 乐签信息 229. 获取歌手视频 +230. 最近播放-歌曲 +231. 最近播放-视频 +232. 最近播放-声音 +233. 最近播放-歌单 +234. 最近播放-专辑 +235. 最近播放-播客 + ## 安装 @@ -970,9 +977,9 @@ tags: 歌单标签 **调用例子 :** `/event/del?evId=6712917601` -### 分享歌曲、歌单、mv、电台、电台节目到动态 +### 分享文本、歌曲、歌单、mv、电台、电台节目到动态 -说明 : 登录后调用此接口 ,可以分享歌曲、歌单、mv、电台、电台节目到动态 +说明 : 登录后调用此接口 ,可以分享文本、歌曲、歌单、mv、电台、电台节目到动态 **必选参数 :** `id` : 资源 id (歌曲,歌单,mv,电台,电台节目对应 id) @@ -3614,6 +3621,68 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **调用例子 :** `/artist/video?id=2116` +### 最近播放-歌曲 + +说明 : 调用此接口 , 可获得最近播放-歌曲 + +**可选参数 :** `limit` : 返回数量 , 默认为 100 + +**接口地址 :** `/record/recent/song` + +**调用例子 :** `/record/recent/song?limit=1` + +### 最近播放-视频 + +说明 : 调用此接口 , 可获得最近播放-视频 + +**可选参数 :** `limit` : 返回数量 , 默认为 100 + +**接口地址 :** `/record/recent/video` + +**调用例子 :** `/record/recent/video?limit=1` + +### 最近播放-声音 + +说明 : 调用此接口 , 可获得最近播放-声音 + +**可选参数 :** `limit` : 返回数量 , 默认为 100 + +**接口地址 :** `/record/recent/voice` + +**调用例子 :** `/record/recent/voice?limit=1` + +### 最近播放-歌单 + +说明 : 调用此接口 , 可获得最近播放-歌单 + +**可选参数 :** `limit` : 返回数量 , 默认为 100 + +**接口地址 :** `/record/recent/playlist` + +**调用例子 :** `/record/recent/playlist?limit=1` + +### 最近播放-专辑 + +说明 : 调用此接口 , 可获得最近播放-歌曲 + +**可选参数 :** `limit` : 返回数量 , 默认为 100 + +**接口地址 :** `/record/recent/album` + +**调用例子 :** `/record/recent/album?limit=1` + +### 最近播放-播客 + +说明 : 调用此接口 , 可获得最近播放-歌曲 + +**可选参数 :** `limit` : 返回数量 , 默认为 100 + +**接口地址 :** `/record/recent/dj` + +**调用例子 :** `/record/recent/dj?limit=1` + + + ## 离线访问此文档 此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问 diff --git a/interface.d.ts b/interface.d.ts index ffd244b..d1140b9 100644 --- a/interface.d.ts +++ b/interface.d.ts @@ -1559,3 +1559,39 @@ export function artist_video( ): Promise export function sign_happy_info(params: RequestBaseConfig): Promise + +export function record_recent_song( + params: { + limit?: number | string + } & RequestBaseConfig, +): Promise + +export function record_recent_video( + params: { + limit?: number | string + } & RequestBaseConfig, +): Promise + +export function record_recent_voice( + params: { + limit?: number | string + } & RequestBaseConfig, +): Promise + +export function record_recent_playlist( + params: { + limit?: number | string + } & RequestBaseConfig, +): Promise + +export function record_recent_album( + params: { + limit?: number | string + } & RequestBaseConfig, +): Promise + +export function record_recent_dj( + params: { + limit?: number | string + } & RequestBaseConfig, +): Promise diff --git a/module/record_recent_album.js b/module/record_recent_album.js new file mode 100644 index 0000000..804bc19 --- /dev/null +++ b/module/record_recent_album.js @@ -0,0 +1,16 @@ +module.exports = (query, request) => { + const data = { + limit: query.limit || 100, + } + return request( + 'POST', + `https://music.163.com/api/play-record/album/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/module/record_recent_dj.js b/module/record_recent_dj.js new file mode 100644 index 0000000..6bd6062 --- /dev/null +++ b/module/record_recent_dj.js @@ -0,0 +1,16 @@ +module.exports = (query, request) => { + const data = { + limit: query.limit || 100, + } + return request( + 'POST', + `https://music.163.com/api/play-record/djradio/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/module/record_recent_playlist.js b/module/record_recent_playlist.js new file mode 100644 index 0000000..d9a7d3d --- /dev/null +++ b/module/record_recent_playlist.js @@ -0,0 +1,16 @@ +module.exports = (query, request) => { + const data = { + limit: query.limit || 100, + } + return request( + 'POST', + `https://music.163.com/api/play-record/playlist/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/module/record_recent_song.js b/module/record_recent_song.js new file mode 100644 index 0000000..275caaa --- /dev/null +++ b/module/record_recent_song.js @@ -0,0 +1,16 @@ +module.exports = (query, request) => { + const data = { + limit: query.limit || 100, + } + return request( + 'POST', + `https://music.163.com/api/play-record/song/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/module/record_recent_video.js b/module/record_recent_video.js new file mode 100644 index 0000000..5a22b96 --- /dev/null +++ b/module/record_recent_video.js @@ -0,0 +1,16 @@ +module.exports = (query, request) => { + const data = { + limit: query.limit || 100, + } + return request( + 'POST', + `https://music.163.com/api/play-record/newvideo/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/module/record_recent_voice.js b/module/record_recent_voice.js new file mode 100644 index 0000000..43f5b1c --- /dev/null +++ b/module/record_recent_voice.js @@ -0,0 +1,16 @@ +module.exports = (query, request) => { + const data = { + limit: query.limit || 100, + } + return request( + 'POST', + `https://music.163.com/api/play-record/voice/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/package.json b/package.json index 9f9c914..949c62b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "4.1.1", + "version": "4.2.0", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js", -- GitLab