From 4c5a1109fc8b63e55678ada289c7fd54cf7165b6 Mon Sep 17 00:00:00 2001 From: binaryify Date: Sun, 22 Nov 2020 21:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=AD=8C=E6=89=8B=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=8E=A5=E5=8F=A3=20#1035?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 4 ++++ README.MD | 3 +++ docs/README.md | 11 +++++++++++ interface.d.ts | 6 ++++++ module/artist_detail.js | 15 +++++++++++++++ package.json | 2 +- 6 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 module/artist_detail.js diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 0a3c62e115b..f1da2a709b5 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,6 +1,10 @@ # 更新日志 +### 3.47.3 | 2020.11.22 +- 新增歌手详情接口 [#1035](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1035) + ### 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/README.MD b/README.MD index b871f52e0f1..3b3744aae58 100644 --- a/README.MD +++ b/README.MD @@ -294,6 +294,9 @@ banner({ type:0 }).then(res=>{ 192. 抱一抱评论 193. 评论抱一抱列表 194. 收藏的专栏 +195. 关注歌手新歌 +196. 关注歌手新MV +197. 歌手详情 ## 更新日志 diff --git a/docs/README.md b/docs/README.md index a5662bf419f..ac3eda7ef87 100644 --- a/docs/README.md +++ b/docs/README.md @@ -212,6 +212,7 @@ 194. 收藏的专栏 195. 关注歌手新歌 196. 关注歌手新MV +197. 歌手详情 ## 安装 @@ -1960,6 +1961,16 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具 **调用例子 :** `/artist/desc?id=6452` ( 周杰伦 ) +### 获取歌手详情 + +说明 : 调用此接口 , 传入歌手 id, 可获得获取歌手详情 + +**必选参数 :** `id`: 歌手 id + +**接口地址 :** `/artist/detail` + +**调用例子 :** `/artist/detail?id=11972054` (Billie Eilish) + ### 获取相似歌手 说明 : 调用此接口 , 传入歌手 id, 可获得相似歌手 diff --git a/interface.d.ts b/interface.d.ts index 9901d11faa2..461179c1030 100644 --- a/interface.d.ts +++ b/interface.d.ts @@ -1354,3 +1354,9 @@ export function artist_new_song( startTimestamp?: number | string } & RequestBaseConfig, ): Promise + +export function artist_detail( + params: { + id: number | string + } & RequestBaseConfig, +): Promise diff --git a/module/artist_detail.js b/module/artist_detail.js new file mode 100644 index 00000000000..8bbb9d97a29 --- /dev/null +++ b/module/artist_detail.js @@ -0,0 +1,15 @@ +module.exports = (query, request) => { + return request( + 'POST', + `https://music.163.com/api/artist/head/info/get`, + { + id: query.id, + }, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} diff --git a/package.json b/package.json index c5f896b7849..2b8aefb1ff4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.47.2", + "version": "3.47.3", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",