diff --git a/CHANGELOG.MD b/CHANGELOG.MD index a6e4b35a815ba24d8db521ef3da60d249c630009..0a3c62e115b0d48349288e198c3c085e128635c7 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,6 @@ # 更新日志 +### 3.47.2 | 2020.11.15 +- 新增关注歌手新歌/新MV接口 [#1028](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1028) ### 3.47.1 | 2020.11.14 - 修复使用post请求取消喜欢音乐会失败的问题 [#1024](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1024) diff --git a/docs/README.md b/docs/README.md index 4f15cf52fbfa2b5c9fe0da1194b27cfde7e5431e..8107ce8eb7594e533ceddb2913c575dce5bafce4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -210,6 +210,8 @@ 192. 抱一抱评论 193. 评论抱一抱列表 194. 收藏的专栏 +195. 关注歌手新歌 +196. 关注歌手新MV ## 安装 @@ -3098,6 +3100,30 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **调用例子 :** `/yunbei/tasks/expense?limit=1` +### 关注歌手新歌 +说明 :登录后调用此接口可获取关注歌手新歌 + +**可选参数 :** `limit`: 取出评论数量 , 默认为 20 + +`before`: 上一页数据返回的publishTime的数据 + +**接口地址 :** `/artist/new/song` + +**调用例子 :** `/artist/new/song?limit=1` `/artist/new/song?limit=1&before=1602777625000` + + +### 关注歌手新MV +说明 :登录后调用此接口可获取关注歌手新MV + +**可选参数 :** `limit`: 取出评论数量 , 默认为 20 + +`before`: 上一页数据返回的publishTime的数据 + +**接口地址 :** `/artist/new/mv` + +**调用例子 :** `/artist/new/mv?limit=1` `/artist/new/mv?limit=1&before=1602777625000` + + ### batch批量请求接口 说明 : 登录后调用此接口 ,传入接口和对应原始参数(原始参数非文档里写的参数,需参考源码),可批量请求接口 diff --git a/interface.d.ts b/interface.d.ts index d35d3389907b9f3c71d56086f1f473cbbddb6772..9901d11faa219d0c24ed0225739e412373f319bb 100644 --- a/interface.d.ts +++ b/interface.d.ts @@ -1333,3 +1333,24 @@ export function topic_sublist( offset?: number | string } & RequestBaseConfig, ): Promise + +export function topic_sublist( + params: { + limit?: number | string + offset?: number | string + } & RequestBaseConfig, +): Promise + +export function artist_new_mv( + params: { + limit?: number | string + startTimestamp?: number | string + } & RequestBaseConfig, +): Promise + +export function artist_new_song( + params: { + limit?: number | string + startTimestamp?: number | string + } & RequestBaseConfig, +): Promise diff --git a/module/artist_new_mv.js b/module/artist_new_mv.js new file mode 100644 index 0000000000000000000000000000000000000000..d08b1d5881554bce7a404a3e6d627b58b102cd09 --- /dev/null +++ b/module/artist_new_mv.js @@ -0,0 +1,19 @@ +module.exports = (query, request) => { + query.cookie.os = 'ios' + query.cookie.appver = '7.3.40' + const data = { + limit: query.limit || 20, + startTimestamp: query.before || Date.now(), + } + return request( + 'POST', + `https://music.163.com/api/sub/artist/new/works/mv/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/module/artist_new_song.js b/module/artist_new_song.js new file mode 100644 index 0000000000000000000000000000000000000000..53545999c97345235a4650340812ec257cde67db --- /dev/null +++ b/module/artist_new_song.js @@ -0,0 +1,19 @@ +module.exports = (query, request) => { + query.cookie.os = 'ios' + query.cookie.appver = '7.3.40' + const data = { + limit: query.limit || 20, + startTimestamp: query.before || Date.now(), + } + return request( + 'POST', + `https://music.163.com/api/sub/artist/new/works/song/list`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/package.json b/package.json index b47064186cb1f90da66ecfa08b0bb64a9a4dbcf0..e6a99d45f5293218f3f4b3a0e9ad0e1f1ff11c26 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.47.1", + "version": "3.47.2", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",