Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1391 from XiaoMengXinX/master
Browse files Browse the repository at this point in the history
新增发送文本动态接口、获取客户端歌曲下载链接url接口
  • Loading branch information
Binaryify authored Nov 6, 2021
2 parents 6c37439 + 793c276 commit e15e7ea
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ banner({ type:0 }).then(res=>{
222. 账号云豆数
223. 领取云豆
224. 获取 VIP 信息
225. 音乐人签到
226. 发送文本动态
227. 获取客户端歌曲下载 url

## 更新日志

Expand Down
20 changes: 20 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@
223. 领取云豆
224. 获取 VIP 信息
225. 音乐人签到
226. 发送文本动态
227. 获取客户端歌曲下载 url

## 安装

Expand Down Expand Up @@ -3507,6 +3509,24 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`

**接口地址 :** `/playlist/privacy`

### 发送文本动态

说明: 可以调用此接口发送动态。

**必选参数 :** `msg` : 要发送的动态内容

**接口地址 :** `/send/event/text`

### 获取客户端歌曲下载 url

说明 : 使用 `/song/url` 接口获取的是歌曲试听 url, 但存在部分歌曲在非 VIP 账号上可以下载无损音质而不能试听无损音质, 使用此接口可使非 VIP 账号获取这些歌曲的无损音频

**必选参数 :** `id` : 音乐 id (仅支持单首歌曲)

**可选参数 :** `br` : 码率, 默认设置了 999000 即最大码率, 如果要 320k 则可设置为 320000, 其他类推

**接口地址 :** `/song/download/url`

## 离线访问此文档

此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
Expand Down
20 changes: 20 additions & 0 deletions module/send_event_text.js
Original file line number Diff line number Diff line change
@@ -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',
},
)
}
20 changes: 20 additions & 0 deletions module/song_download_url.js
Original file line number Diff line number Diff line change
@@ -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',
},
)
}

2 comments on commit e15e7ea

@vercel
Copy link

@vercel vercel bot commented on e15e7ea Nov 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

netease-cloud-music-api – ./docs

netease-cloud-music-api-git-master-binaryify.vercel.app
neteasecloudmusicapi.vercel.app

@vercel
Copy link

@vercel vercel bot commented on e15e7ea Nov 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.