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

Commit

Permalink
Merge pull request #1511 from chen310/master
Browse files Browse the repository at this point in the history
feat: 新增黑胶时光机接口
  • Loading branch information
Binaryify authored Apr 15, 2022
2 parents 9f5f178 + bc3541f commit 896560d
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
239. 音乐人任务(新)
240. 内部版本接口
241. 歌单更新播放量
242. 黑胶时光机

## 安装

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

**调用例子 :** `/inner/version`

### 黑胶时光机

说明 : 调用此接口 , 可获得黑胶时光机数据

**可选参数 :** `startTime` : 开始时间
`endTime` : 结束时间
`limit` : 返回数量 , 默认为 60

**接口地址 :** `/vip/timemachine`

**调用例子 :** `/vip/timemachine` `/vip/timemachine?startTime=1638288000000&endTime=1640966399999&limit=10`(2021年12月) `/vip/timemachine?startTime=1609430400&endTime=1640966399999&limit=60`(2021年)


## 离线访问此文档

Expand Down
8 changes: 8 additions & 0 deletions interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1615,3 +1615,11 @@ export function playlist_update_playcount(
id?: number | string
} & RequestBaseConfig,
): Promise<Response>

export function vip_timemachine(
params: {
startTime?: number | string
endTime?: number | string
limit?: number | string
} & RequestBaseConfig,
): Promise<Response>
22 changes: 22 additions & 0 deletions module/vip_timemachine.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// 黑胶时光机

module.exports = (query, request) => {
const data = {}
if (query.startTime && query.endTime) {
data.startTime = query.startTime
data.endTime = query.endTime
data.type = 1
data.limit = query.limit || 60
}
return request(
'POST',
`https://music.163.com/weapi/vipmusic/newrecord/weekflow`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}

2 comments on commit 896560d

@vercel
Copy link

@vercel vercel bot commented on 896560d Apr 15, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

netease-cloud-music-api – ./docs

netease-cloud-music-api-git-master-binaryify.vercel.app
neteasecloudmusicapi.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 896560d Apr 15, 2022

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.