diff --git a/CHANGELOG.MD b/CHANGELOG.MD index a843b3f6b5c50b63b28ddf3ba3b597cac7abc0d1..9a5cef44f92a45dbbcb6793e80f883c0199b543a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,11 @@ # 更新日志 +### 3.23.0 | 2019.10.16 +- 修复电台 banner 接口无数据问题[#601](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/601) + +- 更新排行榜 [#602](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/602) + +- 新增`电台排行榜`,`新晋电台榜`,`热门电台榜`接口 [#604](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/604) + ### 3.22.4 | 2019.09.26 - 修复私信历史记录分页参数问题,更新文档 [#599](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/599) diff --git a/README.MD b/README.MD index 1af076d2b312ca5eb3d74b93d96e566c41cc809a..85e73374ff0bb5c8d9a341866d4122f86f0bf666 100644 --- a/README.MD +++ b/README.MD @@ -155,6 +155,8 @@ 132. 用户电台 133. 热门电台 134. 电台 - 节目详情 +135. 电台 - 节目榜 +136. 电台 - 新晋电台榜/热门电台榜 ## 环境要求 diff --git a/docs/README.md b/docs/README.md index 2f138f1c169d32c2dbda60e5e1083a22afae3976..2490f3e77acd8a152504305e56ccc788cb8d8dde 100644 --- a/docs/README.md +++ b/docs/README.md @@ -150,6 +150,9 @@ 132. 用户电台 133. 热门电台 134. 电台 - 节目详情 +135. 电台 - 节目榜 +136. 电台 - 新晋电台榜/热门电台榜 + ## 安装 @@ -2071,6 +2074,33 @@ MV 数据 , 数据包含 mv 名字 , 歌手 , 发布时间 , mv 视频地址等 **调用例子 :** `/dj/hot` +### 电台 - 节目榜 + +说明 : 登陆后调用此接口 , 可获得电台节目榜 + +**可选参数 :** + +`limit` : 返回数量 , 默认为 100 + +`offset` : 偏移数量,用于分页 , 如 :( 页数 -1)\*100, 其中 100 为 limit 的值 , 默认为 0 + +**接口地址 :** `/dj/program/toplist` + +**调用例子 :** `/dj/program/toplist?limit=1` + +### 电台 - 新晋电台榜/热门电台榜 + +说明 : 登陆后调用此接口 , 可获得新晋电台榜/热门电台榜 + +**可选参数 :** + +`limit` : 返回数量 , 默认为 100 + +`offset` : 偏移数量,用于分页 , 如 :( 页数 -1)\*100, 其中 100 为 limit 的值 , 默认为 0 +**接口地址 :** `/dj/toplist` + +**调用例子 :** `/dj/toplist?type=hot` `/dj/toplist?type=new&limit=1` + ### 电台 - 推荐 说明 : 登陆后调用此接口 , 可获得推荐电台 diff --git a/module/dj_banner.js b/module/dj_banner.js index 9f20e6f3422d487e0857d32c54562f3e2bfb105f..ca37c914fd22add57f40aa3ea9663215d5095af4 100644 --- a/module/dj_banner.js +++ b/module/dj_banner.js @@ -2,6 +2,7 @@ module.exports = (query, request) => { const data = {}; + query.cookie.os = 'pc'; return request( 'POST', `http://music.163.com/weapi/djradio/banner/get`, diff --git a/module/dj_program_toplist.js b/module/dj_program_toplist.js new file mode 100644 index 0000000000000000000000000000000000000000..3ec08b3e57a8b6712cf0d563caff5d6f0c16401e --- /dev/null +++ b/module/dj_program_toplist.js @@ -0,0 +1,12 @@ +// 电台节目榜 + +module.exports = (query, request) => { + const data = { + limit: query.limit || 100, + offset: query.offset || 0 + } + return request( + 'POST', `https://music.163.com/api/program/toplist/v1`, data, + {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} + ) +} \ No newline at end of file diff --git a/module/dj_toplist.js b/module/dj_toplist.js new file mode 100644 index 0000000000000000000000000000000000000000..920021930051e018294712f6a6ef580558587df8 --- /dev/null +++ b/module/dj_toplist.js @@ -0,0 +1,16 @@ +// 新晋电台榜/热门电台榜 +const typeMap = { + 'new': 0, + 'hot': 1 +} +module.exports = (query, request) => { + const data = { + limit: query.limit || 100, + offset: query.offset || 0, + type: typeMap[query.type || 'new'] || '0' //0为新晋,1为热门 + } + return request( + 'POST', `https://music.163.com/api/djradio/toplist`, data, + {crypto: 'weapi', cookie: query.cookie, proxy: query.proxy} + ) +} \ No newline at end of file diff --git a/module/top_list.js b/module/top_list.js index 057882851c4f7211b4cff980d65e396f34eba02e..a115d5d6dd6f7883705e5ec094530462a8cf8200 100644 --- a/module/top_list.js +++ b/module/top_list.js @@ -35,6 +35,10 @@ const topList = { 31: '2809513713', //云音乐欧美热歌榜 32: '2809577409', //云音乐欧美新歌榜 33: '2847251561', //说唱TOP榜 + 34: '3001835560', //云音乐ACG动画榜 + 35: '3001795926', //云音乐ACG游戏榜 + 36: '3001890046', //云音乐ACG VOCALOID榜 + } module.exports = (query, request) => { diff --git a/package.json b/package.json index d82fff767337eaf0601fd455e00ca43cbd194567..dfaf586b877668033cd30a8aad60412a8c82f1f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "3.22.4", + "version": "3.23.0", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js",