提交 e7df5cd7 编写于 作者: B binaryify

v3.12.0

上级 57f903fd
# 更新日志
### 3.12.0 | 2019.05.10
- 增加`私信内容、我的数字专辑`接口
### 3.11.0 | 2019.05.09
- 增加`通知-私信、通知-评论、通知-@我、通知-通知、设置、云盘数据详情`接口
......
......@@ -134,6 +134,8 @@
111. 通知-通知
112. 设置
113. 云盘数据详情
114. 私信内容
115. 我的数字专辑
## 环境要求
......
......@@ -129,6 +129,8 @@
111. 通知-通知
112. 设置
113. 云盘数据详情
114. 私信内容
115. 我的数字专辑
## 安装
......@@ -423,38 +425,6 @@ tags:歌单tag
**调用例子 :** `/playlist/update/?id=24381616&name=新歌单&desc=描述&tags=学习`
### 发送私信
说明 : 登陆后调用此接口 , 传入用户 id 和要发送的信息, 可以发送私信,返回内容为历史私信,包含带歌单的私信信息(注:不能发送私信给自己)
**必选参数 :**
`user_ids` : 用户 id,多个需用逗号隔开
`msg` : 要发送的信息
**接口地址 :** `/send/text`
**调用例子 :** `/send/text?user_ids=32953014&msg=test`,`/send/text?user_ids=32953014,475625142&msg=test`
返回数据如下图:
![数据](https://ws1.sinaimg.cn/large/006tKfTcgy1fr3p3hfeudj31kw1aek2e.jpg)
### 发送私信(带歌单)
说明 : 登陆后调用此接口 , 传入用户 id 和要发送的信息和歌单 id, 可以发送带歌单的私信(注:不能发送重复的歌单)
**必选参数 :**
`user_ids` : 用户 id,多个需用逗号隔开
`msg` : 要发送的信息
**接口地址 :** `/send/playlist`
**调用例子 :** `/send/playlist?msg=test&user_ids=475625142&playlist=705123491`,`/send/playlist?msg=test2&user_ids=475625142,32953014&playlist=705123493`
返回数据如下图:
![数据](https://ws1.sinaimg.cn/large/006tKfTcgy1fr3p1z7qmcj30v409adg5.jpg)
### 获取用户电台
说明 : 登陆后调用此接口 , 传入用户 id, 可以获取用户电台
......@@ -901,6 +871,8 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
**必选参数 :** `name` : 歌单名
**可选参数 :** `privacy` : 是否设置为隐私歌单,默认否,传'10'则设置成隐私歌单
**接口地址 :** `/playlist/create`
**调用例子 :** `/playlist/create?name=测试歌单`
......@@ -1957,6 +1929,56 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
**调用例子 :** `/msg/private?limit=3`
### 发送私信
说明 : 登陆后调用此接口 , 传入用户 id 和要发送的信息, 可以发送私信,返回内容为历史私信,包含带歌单的私信信息(注:不能发送私信给自己)
**必选参数 :**
`user_ids` : 用户 id,多个需用逗号隔开
`msg` : 要发送的信息
**接口地址 :** `/send/text`
**调用例子 :** `/send/text?user_ids=32953014&msg=test`,`/send/text?user_ids=32953014,475625142&msg=test`
返回数据如下图:
![数据](https://ws1.sinaimg.cn/large/006tKfTcgy1fr3p3hfeudj31kw1aek2e.jpg)
### 私信内容
说明 : 登陆后调用此接口 , 可获取私信内容
**必选参数 :**
`uid` : 用户 id
**可选参数 :**
`limit` : 返回数量 , 默认为 30
`offset` : 偏移数量,用于分页 , 如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0
**接口地址 :**
`/msg/private/history`
**调用例子 :**
`/msg/private/history?uid=9003` (云音乐小秘书)
### 发送私信(带歌单)
说明 : 登陆后调用此接口 , 传入用户 id 和要发送的信息和歌单 id, 可以发送带歌单的私信(注:不能发送重复的歌单)
**必选参数 :**
`user_ids` : 用户 id,多个需用逗号隔开
`msg` : 要发送的信息
**接口地址 :** `/send/playlist`
**调用例子 :** `/send/playlist?msg=test&user_ids=475625142&playlist=705123491`,`/send/playlist?msg=test2&user_ids=475625142,32953014&playlist=705123493`
返回数据如下图:
![数据](https://ws1.sinaimg.cn/large/006tKfTcgy1fr3p1z7qmcj30v409adg5.jpg)
### 通知 - 评论
......@@ -2012,6 +2034,13 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`
**调用例子 :** `/setting`
### 我的数字专辑
说明 : 登陆后调用此接口 ,可获取我的数字专辑
**接口地址 :** `/digitalAlbum/purchased`
**调用例子 :** `/digitalAlbum/purchased?limit=10`
## 离线访问此文档
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
......
// 我的数字专辑
module.exports = (query, request) => {
const data = {
limit: query.limit || 30,
offset: query.offset || 0,
total: true
}
return request(
'POST', `https://music.163.com/api/digitalAlbum/purchased`, data,
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
)
}
\ No newline at end of file
// 私信内容
module.exports = (query, request) => {
const data = {
userId: query.uid,
offset: query.offset || 0,
limit: query.limit || 30,
total: "true"
};
return request(
"POST",
`https://music.163.com/api/msg/private/history`,
data,
{
crypto: "weapi",
cookie: query.cookie,
proxy: query.proxy
}
);
};
// 创建歌单
module.exports = (query, request) => {
query.cookie.os = 'pc'
const data = {
name: query.name
}
return request(
'POST', `https://music.163.com/weapi/playlist/create`, data,
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
)
}
\ No newline at end of file
query.cookie.os = "pc";
const data = {
name: query.name,
privacy: query.privacy //0 为普通歌单,10 为隐私歌单
};
return request("POST", `https://music.163.com/weapi/playlist/create`, data, {
crypto: "weapi",
cookie: query.cookie,
proxy: query.proxy
});
};
{
"name": "NeteaseCloudMusicApi",
"version": "3.11.0",
"version": "3.12.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册