diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 8ef1f7b9575c4dfb85bcea4f51423037c4cf966d..cd1b883ce1cd6607ff76a88563e1480744e07ae1 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,7 @@ # 更新日志 +### 3.10.0 | 2019.05.08 +- 增加转发动态接口 + ### 3.9.0 | 2019.05.03 - 新增 云盘歌曲删除, 热门话题, 电台 - 推荐类型, 电台 - 非热门类型, 电台 - 今日优选, 心动模式/智能播放等接口 diff --git a/README.MD b/README.MD index d618a11b4cff17017ce28bec90528c04723c1ce1..90f6360dc6a3b404dcbd3d70f34ce84b1f0d491e 100644 --- a/README.MD +++ b/README.MD @@ -125,6 +125,8 @@ 102. 电台 - 非热门类型 103. 电台 - 今日优选 104. 心动模式/智能播放 +105. 转发动态 + ## 环境要求 diff --git a/docs/README.md b/docs/README.md index 928109c41104ce2f1a5c0c78599936efd25b9c6f..69e972b44be2c3e440ee8bd24e635e1db560838c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -120,7 +120,7 @@ 102. 电台 - 非热门类型 103. 电台 - 今日优选 104. 心动模式/智能播放 - +105. 转发动态 ## 安装 @@ -497,6 +497,23 @@ tags:歌单tag **调用例子 :** `/user/event?uid=32953014` +### 转发用户动态 +说明 : 登陆后调用此接口 ,可以转发用户动态 + +**必选参数 :** `uid` : 用户 id + +`evId` : 动态 id + +`forwards` : 转发的评论 + +**接口地址 :** `/event/forward` + +**调用例子 :** `/event/forward?evId=6712917601&uid=32953014&forwards=测试内容` + +如下图 +![](https://ws4.sinaimg.cn/large/006tNc79gy1g2trwz8o2gj31b20r6t9n.jpg) +![](https://ws3.sinaimg.cn/large/006tNc79gy1g2trxa0vlej319u0gyjrq.jpg) + ### 获取动态评论 说明 : 登陆后调用此接口 , 可以获取动态下评论 diff --git a/module/event_forward.js b/module/event_forward.js new file mode 100644 index 0000000000000000000000000000000000000000..0b5af54279024578765614515241ca219f8cc18c --- /dev/null +++ b/module/event_forward.js @@ -0,0 +1,15 @@ +// 转发动态 + +module.exports = (query, request) => { + query.cookie.os = "pc"; + const data = { + forwards: query.forwards, + id: query.evId, + eventUserId: query.uid + }; + return request("POST", `https://music.163.com/weapi/event/forward`, data, { + crypto: "weapi", + cookie: query.cookie, + proxy: query.proxy + }); +}; diff --git a/module/forward.js b/module/forward.js deleted file mode 100644 index 8155ff8c8ca7951e854f040690704ce37c0548f1..0000000000000000000000000000000000000000 --- a/module/forward.js +++ /dev/null @@ -1,17 +0,0 @@ -// 转发动态 - -const crypto = require('crypto') - -module.exports = (query, request) => { - query.cookie.os = 'osx' - const data = { - forwards: query.forwards, - id: query.id, - eventUserId: query.eventUserId, - checkToken:query.checkToken - } - return request( - 'POST', `https://music.163.com/weapi/event/forward`, data, - {crypto: 'weapi', ua: 'pc', cookie: query.cookie, proxy: query.proxy} - ) -} \ No newline at end of file diff --git a/package.json b/package.json index a581e6efed6f7da35b84a6afad69f442a26ebb98..9e0748563fe2da6361bc01729b5d89d5c9dc595a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.9.0", + "version": "3.10.0", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",