~/Projects/163-music-proxy
git clone https://code.lsong.org/163-music-proxy
Commit
- Commit
- e15e7ea664703bd0f2d32083d096bcec5a5bb11d
- Author
- binaryify <[email protected]>
- Date
- 2021-11-06 21:58:36 +0800 +0800
- Diffstat
README.MD | 3 +++ docs/README.md | 20 ++++++++++++++++++++ module/send_event_text.js | 20 ++++++++++++++++++++ module/song_download_url.js | 20 ++++++++++++++++++++
Merge pull request #1391 from XiaoMengXinX/master 新增发送文本动态接口、获取客户端歌曲下载链接url接口
diff --git a/README.MD b/README.MD index d02beac944d592cd1dd983e2b6f1a5502e727544..4c91fb59bd57137c92863cec51548fc751348c94 100644 --- a/README.MD +++ b/README.MD @@ -344,6 +344,9 @@ 221. 音乐人任务 222. 账号云豆数 223. 领取云豆 224. 获取 VIP 信息 +225. 音乐人签到 +226. 发送文本动态 +227. 获取客户端歌曲下载 url ## 更新日志 diff --git a/docs/README.md b/docs/README.md index 240c4e4f8cdd68de4d1d6682f2d2fc2e40c22663..795ef68e53edcf55b0e96d9b108a4befa53da68a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -241,6 +241,8 @@ 222. 账号云豆数 223. 领取云豆 224. 获取 VIP 信息 225. 音乐人签到 +226. 发送文本动态 +227. 获取客户端歌曲下载 url ## 安装 @@ -3506,6 +3508,24 @@ **必选参数 :** `id` : 歌单ID **接口地址 :** `/playlist/privacy` + +### 发送文本动态 + +说明: 可以调用此接口发送动态。 + +**必选参数 :** `msg` : 要发送的动态内容 + +**接口地址 :** `/send/event/text` + +### 获取客户端歌曲下载 url + +说明 : 使用 `/song/url` 接口获取的是歌曲试听 url, 但存在部分歌曲在非 VIP 账号上可以下载无损音质而不能试听无损音质, 使用此接口可使非 VIP 账号获取这些歌曲的无损音频 + +**必选参数 :** `id` : 音乐 id (仅支持单首歌曲) + +**可选参数 :** `br` : 码率, 默认设置了 999000 即最大码率, 如果要 320k 则可设置为 320000, 其他类推 + +**接口地址 :** `/song/download/url` ## 离线访问此文档 diff --git a/module/send_event_text.js b/module/send_event_text.js new file mode 100644 index 0000000000000000000000000000000000000000..0fe552f18d951447c142d064ca04dcf83da463eb --- /dev/null +++ b/module/send_event_text.js @@ -0,0 +1,20 @@ +// 发送文本动态 + +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/song_download_url.js b/module/song_download_url.js new file mode 100644 index 0000000000000000000000000000000000000000..73eccc9f41d886e50d6025987b7da6406b1d4c31 --- /dev/null +++ b/module/song_download_url.js @@ -0,0 +1,20 @@ +// 获取客户端歌曲下载链接 + +module.exports = (query, request) => { + const data = { + id: query.id, + br: parseInt(query.br || 999000), + } + return request( + 'POST', + `https://interface.music.163.com/eapi/song/enhance/download/url`, + data, + { + crypto: 'eapi', + cookie: query.cookie, + proxy: query.proxy, + realIP: query.realIP, + url: '/api/song/enhance/download/url', + }, + ) +}