diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 4a469e046cb777b0a88000942c93bc489fda65ce..17697f5496f3e3142bcb6b4f625130249c93322d 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 7ac5454716ad3aebfc2dbfed261b87c4875957bf..0a7dcaee9a3303f95494127df1ecc0b673983b4e 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 2b54ab7fc53bffba9b27ddbcc349201da603dced..7554f365dab64655ca772f7301ab3d0d9052428c 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 ffd244b6bfe117626a004212aac24db72e381e08..d1140b950d2c59c991596b7ecff86320a3402d87 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 0000000000000000000000000000000000000000..804bc198489ea55f950e65ea6fc00b6306e5c662 --- /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 0000000000000000000000000000000000000000..6bd60625d00945f89a108402eacaf12f1bb94bb3 --- /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 0000000000000000000000000000000000000000..d9a7d3d8f0d0438af96faf0d15722cc59e52778b --- /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 0000000000000000000000000000000000000000..275caaae0091c621f7d9156a5e2ab66de4fbbb97 --- /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 0000000000000000000000000000000000000000..5a22b96181ca985848b4fc4f95b3f6dffeaaae23 --- /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 0000000000000000000000000000000000000000..43f5b1cc3fdf825dcb79aff22c267638db90180a --- /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 9f9c914d7963a78be8bbf0e34139672fa259a702..949c62b3d06fe36620eb95a8cc3d1d3a87c2bb7d 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",