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

Commit

Permalink
新增接口 #971
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Oct 16, 2020
1 parent edf7077 commit b59eaf4
Show file tree
Hide file tree
Showing 6 changed files with 41 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.43.0 | 2020.10.16
- 新增`电台订阅者列表`接口 [#971](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/971)

### 3.42.4 | 2020.10.07
- 修复新评论接口分页参数问题

Expand Down
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ banner({ type:0 }).then(res=>{
176. 删除视频歌单里的视频
177. 最近播放的视频
178. 音乐日历
179. 电台订阅者列表


## 更新日志
Expand Down
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
176. 删除视频歌单里的视频
177. 最近播放的视频
178. 音乐日历
179. 电台订阅者列表

## 安装

Expand Down Expand Up @@ -2460,6 +2461,19 @@ type : 地区

**调用例子 :** `/dj/personalize/recommend?limit=5`

### 电台订阅者列表
说明 : 调用此接口,可获取电台订阅者列表
**必选参数 :** `id`: 电台id

**可选参数 :**
`time` : 分页参数,默认-1,传入上一次返回结果的 time,将会返回下一页的数据

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

**接口地址 :** `/dj/subscriber`

**调用例子 :** `/dj/subscriber?id=335425050` , `/dj/subscriber?id=335425050&time=1602761825390`

### 用户电台

说明 : 调用此接口, 传入用户id可获取用户创建的电台
Expand Down
6 changes: 6 additions & 0 deletions interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1261,3 +1261,9 @@ export function user_replacephone(
): Promise<Response>

export function user_safe(params: RequestBaseConfig): Promise<Response>

export function dj_subscriber(params: {
id: number | string
limit?: number | string
time?: number | string
} & RequestBaseConfig,): Promise<Response>
16 changes: 16 additions & 0 deletions module/dj_subscriber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 电台详情

module.exports = (query, request) => {
const data = {
time: query.time || '-1',
id: query.id,
limit: query.limit || '20',
total: 'true',
}
return request('POST', `https://music.163.com/api/djradio/subscriber`, data, {
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
})
}
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.42.4",
"version": "3.43.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down

1 comment on commit b59eaf4

@vercel
Copy link

@vercel vercel bot commented on b59eaf4 Oct 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.