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

Commit

Permalink
修复电台 banner 接口无数据问题 #601,更新排行榜 #602,新增电台排行榜,新晋电台榜,热门电台榜接口 #604
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Oct 16, 2019
1 parent c0e4b39 commit b9f02d6
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 2 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@
132. 用户电台
133. 热门电台
134. 电台 - 节目详情
135. 电台 - 节目榜
136. 电台 - 新晋电台榜/热门电台榜

## 环境要求

Expand Down
30 changes: 30 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
132. 用户电台
133. 热门电台
134. 电台 - 节目详情
135. 电台 - 节目榜
136. 电台 - 新晋电台榜/热门电台榜


## 安装

Expand Down Expand Up @@ -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`

### 电台 - 推荐

说明 : 登陆后调用此接口 , 可获得推荐电台
Expand Down
1 change: 1 addition & 0 deletions module/dj_banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down
12 changes: 12 additions & 0 deletions module/dj_program_toplist.js
Original file line number Diff line number Diff line change
@@ -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}
)
}
16 changes: 16 additions & 0 deletions module/dj_toplist.js
Original file line number Diff line number Diff line change
@@ -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}
)
}
4 changes: 4 additions & 0 deletions module/top_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "NeteaseCloudMusicApi",
"version": "3.22.4",
"version": "3.23.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down

0 comments on commit b9f02d6

Please sign in to comment.