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

Commit

Permalink
新增类别热门电台接口 #607
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Oct 22, 2019
1 parent 6d96d10 commit c0ff65b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 更新日志
### 3.24.0 | 2019.10.22
- 新增`类别热门电台` 接口 [#607](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/607)

### 3.23.0 | 2019.10.16
- 修复电台 banner 接口无数据问题[#601](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/601)

Expand Down
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
134. 电台 - 节目详情
135. 电台 - 节目榜
136. 电台 - 新晋电台榜/热门电台榜
137. 类别热门电台

## 环境要求

Expand Down
15 changes: 15 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
134. 电台 - 节目详情
135. 电台 - 节目榜
136. 电台 - 新晋电台榜/热门电台榜
137. 类别热门电台


## 安装
Expand Down Expand Up @@ -2104,6 +2105,20 @@ MV 数据 , 数据包含 mv 名字 , 歌手 , 发布时间 , mv 视频地址等

**调用例子 :** `/dj/toplist?type=hot` `/dj/toplist?type=new&limit=1`

### 电台 - 类别热门电台

**可选参数 :**

`limit` : 返回数量 , 默认为 30

`offset` : 偏移数量,用于分页 , 如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0

`cateId`: 类别 id,可通过 `/dj/category/recommend` 接口获取

**接口地址 :** `/dj/radio/hot`

**调用例子 :** `/dj/radio/hot?cateId=2001`(创作|翻唱) `/dj/radio/hot?cateId=10002` (3D|电子)

### 电台 - 推荐

说明 : 登陆后调用此接口 , 可获得推荐电台
Expand Down
13 changes: 13 additions & 0 deletions module/dj_radio_hot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// 类别热门电台

module.exports = (query, request) => {
const data = {
cateId: query.cateId,
limit: query.limit || 30,
offset: query.offset || 0
}
return request(
'POST', `https://music.163.com/api/djradio/hot`, data,
{ crypto: 'weapi', cookie: query.cookie, proxy: query.proxy }
)
}
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.23.0",
"version": "3.24.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down

0 comments on commit c0ff65b

Please sign in to comment.