Skip to content

Commit

Permalink
v4.2.0 新增最近播放-歌曲,最近播放-视频,最近播放-声音,最近播放-歌单,最近播放-专辑,最近播放-播客等接口
Browse files Browse the repository at this point in the history
  • Loading branch information
Binaryify committed Nov 23, 2021
1 parent 1684517 commit 0d4f4d6
Show file tree
Hide file tree
Showing 11 changed files with 215 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# 更新日志
### 4.2.0 | 2021.11.23

- 合并相同接口(发送文本动态,使用`/share/resource`接口代替);增加歌手视频接口;增加创建共享歌单的用法 [#1402](https://github.com/Binaryify/NeteaseCloudMusicApi/pull/1402)

- 新增最近播放-歌曲,最近播放-视频,最近播放-声音,最近播放-歌单,最近播放-专辑,最近播放-播客等接口

### 4.1.1 | 2021.11.20

Expand Down
6 changes: 6 additions & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ banner({ type:0 }).then(res=>{
227. 获取客户端歌曲下载 url
228. 获取歌单所有歌曲
229. 乐签信息
230. 最近播放-歌曲
231. 最近播放-视频
232. 最近播放-声音
233. 最近播放-歌单
234. 最近播放-专辑
235. 最近播放-播客

## 更新日志

Expand Down
73 changes: 71 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@
227. 获取歌单所有歌曲
228. 乐签信息
229. 获取歌手视频
230. 最近播放-歌曲
231. 最近播放-视频
232. 最近播放-声音
233. 最近播放-歌单
234. 最近播放-专辑
235. 最近播放-播客


## 安装

Expand Down Expand Up @@ -970,9 +977,9 @@ tags: 歌单标签

**调用例子 :** `/event/del?evId=6712917601`

### 分享歌曲、歌单、mv、电台、电台节目到动态
### 分享文本、歌曲、歌单、mv、电台、电台节目到动态

说明 : 登录后调用此接口 ,可以分享歌曲、歌单、mv、电台、电台节目到动态
说明 : 登录后调用此接口 ,可以分享文本、歌曲、歌单、mv、电台、电台节目到动态

**必选参数 :** `id` : 资源 id (歌曲,歌单,mv,电台,电台节目对应 id)

Expand Down Expand Up @@ -3614,6 +3621,68 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`

**调用例子 :** `/artist/video?id=2116`

### 最近播放-歌曲

说明 : 调用此接口 , 可获得最近播放-歌曲

**可选参数 :** `limit` : 返回数量 , 默认为 100

**接口地址 :** `/record/recent/song`

**调用例子 :** `/record/recent/song?limit=1`

### 最近播放-视频

说明 : 调用此接口 , 可获得最近播放-视频

**可选参数 :** `limit` : 返回数量 , 默认为 100

**接口地址 :** `/record/recent/video`

**调用例子 :** `/record/recent/video?limit=1`

### 最近播放-声音

说明 : 调用此接口 , 可获得最近播放-声音

**可选参数 :** `limit` : 返回数量 , 默认为 100

**接口地址 :** `/record/recent/voice`

**调用例子 :** `/record/recent/voice?limit=1`

### 最近播放-歌单

说明 : 调用此接口 , 可获得最近播放-歌单

**可选参数 :** `limit` : 返回数量 , 默认为 100

**接口地址 :** `/record/recent/playlist`

**调用例子 :** `/record/recent/playlist?limit=1`

### 最近播放-专辑

说明 : 调用此接口 , 可获得最近播放-歌曲

**可选参数 :** `limit` : 返回数量 , 默认为 100

**接口地址 :** `/record/recent/album`

**调用例子 :** `/record/recent/album?limit=1`

### 最近播放-播客

说明 : 调用此接口 , 可获得最近播放-歌曲

**可选参数 :** `limit` : 返回数量 , 默认为 100

**接口地址 :** `/record/recent/dj`

**调用例子 :** `/record/recent/dj?limit=1`



## 离线访问此文档

此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
Expand Down
36 changes: 36 additions & 0 deletions interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1559,3 +1559,39 @@ export function artist_video(
): Promise<Response>

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

export function record_recent_song(
params: {
limit?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function record_recent_video(
params: {
limit?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function record_recent_voice(
params: {
limit?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function record_recent_playlist(
params: {
limit?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function record_recent_album(
params: {
limit?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function record_recent_dj(
params: {
limit?: number | string
} & RequestBaseConfig,
): Promise<Response>
16 changes: 16 additions & 0 deletions module/record_recent_album.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = (query, request) => {
const data = {
limit: query.limit || 100,
}
return request(
'POST',
`https://music.163.com/api/play-record/album/list`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
16 changes: 16 additions & 0 deletions module/record_recent_dj.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = (query, request) => {
const data = {
limit: query.limit || 100,
}
return request(
'POST',
`https://music.163.com/api/play-record/djradio/list`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
16 changes: 16 additions & 0 deletions module/record_recent_playlist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = (query, request) => {
const data = {
limit: query.limit || 100,
}
return request(
'POST',
`https://music.163.com/api/play-record/playlist/list`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
16 changes: 16 additions & 0 deletions module/record_recent_song.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = (query, request) => {
const data = {
limit: query.limit || 100,
}
return request(
'POST',
`https://music.163.com/api/play-record/song/list`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
16 changes: 16 additions & 0 deletions module/record_recent_video.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = (query, request) => {
const data = {
limit: query.limit || 100,
}
return request(
'POST',
`https://music.163.com/api/play-record/newvideo/list`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
16 changes: 16 additions & 0 deletions module/record_recent_voice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = (query, request) => {
const data = {
limit: query.limit || 100,
}
return request(
'POST',
`https://music.163.com/api/play-record/voice/list`,
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": "4.1.1",
"version": "4.2.0",
"description": "网易云音乐 NodeJS 版 API",
"scripts": {
"start": "node app.js",
Expand Down

0 comments on commit 0d4f4d6

Please sign in to comment.