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

Commit

Permalink
电台个性推荐接口 #824
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Sep 19, 2020
1 parent b935a55 commit 372a81f
Show file tree
Hide file tree
Showing 8 changed files with 42 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.41.1 | 2020.09.19
- 新增`电台个性推荐接口` [#824](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/824)

### 3.41.0 | 2020.09.19
- 新增`精品歌单标签列表`接口 [#921](https://github.com/Binaryify/NeteaseCloudMusicApi/issues/921)

Expand Down
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ banner({ type:0 }).then(res=>{
167. 歌手全部歌曲
168. 精品歌单标签列表
169. 用户等级信息
170. 电台个性推荐


## 更新日志
Expand Down
10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
167. 歌手全部歌曲
168. 精品歌单标签列表
169. 用户等级信息
170. 电台个性推荐

## 安装

Expand Down Expand Up @@ -2333,6 +2334,15 @@ type : 地区

**调用例子 :** `/dj/banner`

### 电台个性推荐
说明 : 调用此接口,可获取电台个性推荐列表
**可选参数 :**

`limit` : 返回数量,默认为 6,总条数最多6条

**接口地址 :** `/dj/personalize/recommend`

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

### 用户电台

Expand Down
1 change: 1 addition & 0 deletions interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,4 @@ export * from './module_types/weblog'
export * from './module_types/base'
export * from './module_types/user_level'
export * from './module_types/playlist_highquality_tags'
export * from './module_types/dj_personalize_recommend'
4 changes: 4 additions & 0 deletions main.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ import {
APIBaseResponse,
UserLevelRequestConfig,
PlaylistHighqualityTagsRequestConfig,
DjPersonalizeRecommendRequestConfig,
} from './interface'
// Start
// export interface Response<T> {
Expand Down Expand Up @@ -333,6 +334,9 @@ interface APIInstance {
dj_paygift: (
params: DjPaygiftRequestConfig,
) => Promise<Response<APIBaseResponse>>
dj_personalize_recommend: (
params: DjPersonalizeRecommendRequestConfig,
) => Promise<Response<APIBaseResponse>>
dj_program: (
params: DjProgramRequestConfig,
) => Promise<Response<APIBaseResponse>>
Expand Down
17 changes: 17 additions & 0 deletions module/dj_personalize_recommend.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 电台个性推荐

module.exports = (query, request) => {
return request(
'POST',
`https://music.163.com/api/djradio/personalize/rcmd`,
{
limit: query.limit || 6,
},
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
5 changes: 5 additions & 0 deletions module_types/dj_personalize_recommend.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { RequestBaseConfig } from './base'

export interface DjPersonalizeRecommendRequestConfig extends RequestBaseConfig {
limit?: string | number
}
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.41.0",
"version": "3.41.1",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down

1 comment on commit 372a81f

@vercel
Copy link

@vercel vercel bot commented on 372a81f Sep 19, 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.