Skip to content

Commit

Permalink
Merge pull request Binaryify#1596 from kengwang/master
Browse files Browse the repository at this point in the history
新增部分 API
  • Loading branch information
Binaryify authored Sep 2, 2022
2 parents 7a0321b + be156c5 commit dfc104e
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3877,6 +3877,39 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009`

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

### 音乐百科 - 简要信息

说明: 调用此接口可以获取歌曲的音乐百科简要信息

由于此接口返回内容过于复杂, 请按需取用

**接口地址:** `/song/wiki/about`

**必选参数:** `id`: 歌曲 ID

**调用例子:** `/song/wiki/about?id=1958384591`

### 乐谱列表

说明: 调用此接口可以获取歌曲的乐谱列表

**接口地址:** `/sheet/list`

**必选参数:** `id`: 歌曲 ID

**调用例子:** `/sheet/list?id=1815684465`

### 乐谱内容

说明: 调用此接口获取乐谱的内容

**接口地址:** `/sheet/preview`

**必选参数:** `id`: **乐谱** ID

**调用例子:** `/sheet/list?id=245206`



## 离线访问此文档

Expand Down
20 changes: 20 additions & 0 deletions module/sheet_list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 乐谱列表
const crypto = require('crypto')
module.exports = (query, request) => {
const data = {
id: query.id,
abTest: query.ab || 'b'
}
return request(
'POST',
`https://interface3.music.163.com/eapi/music/sheet/list/v1`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
url: '/api/music/sheet/list/v1',
},
)
}
19 changes: 19 additions & 0 deletions module/sheet_preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 乐谱预览
const crypto = require('crypto')
module.exports = (query, request) => {
const data = {
id: query.id,
}
return request(
'POST',
`https://interface3.music.163.com/eapi//music/sheet/preview/info?id=${query.id}`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
url: '/api//music/sheet/preview/info',// 我没写错! 他们就是这么请求的!
},
)
}
19 changes: 19 additions & 0 deletions module/song_wiki_summary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 音乐百科基础信息
const crypto = require('crypto')
module.exports = (query, request) => {
const data = {
songId: query.id
}
return request(
'POST',
`https://interface3.music.163.com/eapi/music/wiki/home/song/get`,
data,
{
crypto: 'eapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
url: '/api/song/play/about/block/page',
},
)
}

0 comments on commit dfc104e

Please sign in to comment.