From 873eb5889922c62b4d2f00fc3e0c5936d4d2a0e5 Mon Sep 17 00:00:00 2001 From: chen_10 <1803012703@qq.com> Date: Tue, 23 Nov 2021 15:05:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=90=88=E5=B9=B6=E7=9B=B8=E5=90=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README.md | 17 ++++------------- module/send_event_text.js | 20 -------------------- module/share_resource.js | 2 +- 3 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 module/send_event_text.js diff --git a/docs/README.md b/docs/README.md index 67a927c..71c7126 100644 --- a/docs/README.md +++ b/docs/README.md @@ -241,10 +241,9 @@ 223. 领取云豆 224. 获取 VIP 信息 225. 音乐人签到 -226. 发送文本动态 -227. 获取客户端歌曲下载 url -228. 获取歌单所有歌曲 -229. 乐签信息 +226. 获取客户端歌曲下载 url +227. 获取歌单所有歌曲 +228. 乐签信息 ## 安装 @@ -982,7 +981,7 @@ tags: 歌单标签 **接口地址 :** `/share/resource` -**调用例子 :** `/share/resource?id=1297494209&msg=测试` `/share/resource?type=djradio&id=336355127` `/share/resource?type=djprogram&id=2061034798` `/share/resource?type=djprogram&id=2061034798&msg=测试@binaryify 测试` +**调用例子 :** `/share/resource?id=1297494209&msg=测试` `/share/resource?type=djradio&id=336355127` `/share/resource?type=djprogram&id=2061034798` `/share/resource?type=djprogram&id=2061034798&msg=测试@binaryify 测试` `/share/resource?type=noresource&msg=测试` ### 获取动态评论 @@ -3588,14 +3587,6 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **接口地址 :** `/playlist/privacy` -### 发送文本动态 - -说明: 可以调用此接口发送动态。 - -**必选参数 :** `msg` : 要发送的动态内容 - -**接口地址 :** `/send/event/text` - ### 获取客户端歌曲下载 url 说明 : 使用 `/song/url` 接口获取的是歌曲试听 url, 但存在部分歌曲在非 VIP 账号上可以下载无损音质而不能试听无损音质, 使用此接口可使非 VIP 账号获取这些歌曲的无损音频 diff --git a/module/send_event_text.js b/module/send_event_text.js deleted file mode 100644 index 0fe552f..0000000 --- a/module/send_event_text.js +++ /dev/null @@ -1,20 +0,0 @@ -// 发送文本动态 - -module.exports = (query, request) => { - const data = { - msg: query.msg, - type: 'noresource', - } - return request( - 'POST', - `https://interface.music.163.com/eapi/share/friends/resource`, - data, - { - crypto: 'eapi', - cookie: query.cookie, - proxy: query.proxy, - realIP: query.realIP, - url: '/api/share/friends/resource', - }, - ) -} diff --git a/module/share_resource.js b/module/share_resource.js index 64c016a..80b7a5e 100644 --- a/module/share_resource.js +++ b/module/share_resource.js @@ -2,7 +2,7 @@ module.exports = (query, request) => { const data = { - type: query.type || 'song', // song,playlist,mv,djprogram,djradio + type: query.type || 'song', // song,playlist,mv,djprogram,djradio,noresource msg: query.msg || '', id: query.id || '', } From 8d7c147696074cd4ac24831a97277d46efd95df8 Mon Sep 17 00:00:00 2001 From: chen_10 <1803012703@qq.com> Date: Tue, 23 Nov 2021 15:32:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=AD=8C=E6=89=8B?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README.md | 17 +++++++++++++++++ interface.d.ts | 15 +++++++++------ module/artist_video.js | 24 ++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 module/artist_video.js diff --git a/docs/README.md b/docs/README.md index 71c7126..c8abe61 100644 --- a/docs/README.md +++ b/docs/README.md @@ -244,6 +244,7 @@ 226. 获取客户端歌曲下载 url 227. 获取歌单所有歌曲 228. 乐签信息 +229. 获取歌手视频 ## 安装 @@ -3597,6 +3598,22 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **接口地址 :** `/song/download/url` +### 获取歌手视频 + +说明 : 调用此接口 , 传入歌手 id, 可获得歌手视频 + +**必选参数 :** `id` : 歌手 id + +**可选参数 :** `size` : 返回数量 , 默认为 10 + +`cursor` : 返回数据的 cursor, 默认为 0 , 传入上一次返回结果的 cursor,将会返回下一页的数据 + +`order` : 排序方法, 0 表示按时间排序, 1 表示按热度排序, 默认为 0 + +**接口地址 :** `/artist/video` + +**调用例子 :** `/artist/video?id=2116` + ## 离线访问此文档 此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问 diff --git a/interface.d.ts b/interface.d.ts index 9bc39c4..ffd244b 100644 --- a/interface.d.ts +++ b/interface.d.ts @@ -1542,12 +1542,6 @@ export function song_download_url( } & RequestBaseConfig, ): Promise -export function send_event_text( - params: { - msg: number | string - } & RequestBaseConfig, -): Promise - export function playlist_track_all( params: { id: number | string @@ -1555,4 +1549,13 @@ export function playlist_track_all( } & RequestBaseConfig, ): Promise +export function artist_video( + params: { + id: number | string + size?: number | string + cursor?: number | string + order?: number | string + } & RequestBaseConfig, +): Promise + export function sign_happy_info(params: RequestBaseConfig): Promise diff --git a/module/artist_video.js b/module/artist_video.js new file mode 100644 index 0000000..735fe07 --- /dev/null +++ b/module/artist_video.js @@ -0,0 +1,24 @@ +// 歌手相关视频 + +module.exports = (query, request) => { + const data = { + artistId: query.id, + page: JSON.stringify({ + size: query.size || 10, + cursor: query.cursor || 0, + }), + tab: 0, + order: query.order || 0, + } + return request( + 'POST', + `https://music.163.com/weapi/mlog/artist/video`, + data, + { + crypto: 'weapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + }, + ) +} From 0f27e22656eadef66082707c3a50a2bd54013a22 Mon Sep 17 00:00:00 2001 From: chen_10 <1803012703@qq.com> Date: Tue, 23 Nov 2021 15:42:46 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E5=85=B1=E4=BA=AB=E6=AD=8C=E5=8D=95=E7=9A=84=E7=94=A8=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README.md | 2 +- module/playlist_create.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index c8abe61..2b54ab7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1424,7 +1424,7 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具 `privacy` : 是否设置为隐私歌单,默认否,传'10'则设置成隐私歌单 -`type` : 歌单类型,默认'NORMAL',传 'VIDEO'则为视频歌单 +`type` : 歌单类型,默认'NORMAL',传 'VIDEO'则为视频歌单,传 'SHARED'则为共享歌单 **接口地址 :** `/playlist/create` diff --git a/module/playlist_create.js b/module/playlist_create.js index 8a1ae26..f33f5f0 100644 --- a/module/playlist_create.js +++ b/module/playlist_create.js @@ -5,7 +5,7 @@ module.exports = (query, request) => { const data = { name: query.name, privacy: query.privacy, //0 为普通歌单,10 为隐私歌单 - type: query.type || 'NORMAL', // NORMAL|VIDEO + type: query.type || 'NORMAL', // NORMAL|VIDEO|SHARED } return request('POST', `https://music.163.com/api/playlist/create`, data, { crypto: 'weapi',