提交 b9f02d6b 编写于 作者: B binaryify

修复电台 banner 接口无数据问题 #601,更新排行榜 #602,新增电台排行榜,新晋电台榜,热门电台榜接口 #604

上级 c0e4b399
# 更新日志 # 更新日志
### 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 ### 3.22.4 | 2019.09.26
- 修复私信历史记录分页参数问题,更新文档 [#599](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/599) - 修复私信历史记录分页参数问题,更新文档 [#599](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/599)
......
...@@ -155,6 +155,8 @@ ...@@ -155,6 +155,8 @@
132. 用户电台 132. 用户电台
133. 热门电台 133. 热门电台
134. 电台 - 节目详情 134. 电台 - 节目详情
135. 电台 - 节目榜
136. 电台 - 新晋电台榜/热门电台榜
## 环境要求 ## 环境要求
......
...@@ -150,6 +150,9 @@ ...@@ -150,6 +150,9 @@
132. 用户电台 132. 用户电台
133. 热门电台 133. 热门电台
134. 电台 - 节目详情 134. 电台 - 节目详情
135. 电台 - 节目榜
136. 电台 - 新晋电台榜/热门电台榜
## 安装 ## 安装
...@@ -2071,6 +2074,33 @@ MV 数据 , 数据包含 mv 名字 , 歌手 , 发布时间 , mv 视频地址等 ...@@ -2071,6 +2074,33 @@ MV 数据 , 数据包含 mv 名字 , 歌手 , 发布时间 , mv 视频地址等
**调用例子 :** `/dj/hot` **调用例子 :** `/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`
### 电台 - 推荐 ### 电台 - 推荐
说明 : 登陆后调用此接口 , 可获得推荐电台 说明 : 登陆后调用此接口 , 可获得推荐电台
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
module.exports = (query, request) => { module.exports = (query, request) => {
const data = {}; const data = {};
query.cookie.os = 'pc';
return request( return request(
'POST', 'POST',
`http://music.163.com/weapi/djradio/banner/get`, `http://music.163.com/weapi/djradio/banner/get`,
......
// 电台节目榜
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
// 新晋电台榜/热门电台榜
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
...@@ -35,6 +35,10 @@ const topList = { ...@@ -35,6 +35,10 @@ const topList = {
31: '2809513713', //云音乐欧美热歌榜 31: '2809513713', //云音乐欧美热歌榜
32: '2809577409', //云音乐欧美新歌榜 32: '2809577409', //云音乐欧美新歌榜
33: '2847251561', //说唱TOP榜 33: '2847251561', //说唱TOP榜
34: '3001835560', //云音乐ACG动画榜
35: '3001795926', //云音乐ACG游戏榜
36: '3001890046', //云音乐ACG VOCALOID榜
} }
module.exports = (query, request) => { module.exports = (query, request) => {
......
{ {
"name": "NeteaseCloudMusicApi", "name": "NeteaseCloudMusicApi",
"version": "3.22.4", "version": "3.23.0",
"description": "网易云音乐 NodeJS 版 API", "description": "网易云音乐 NodeJS 版 API",
"scripts": { "scripts": {
"start": "node app.js", "start": "node app.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册