mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-22 14:43:10 +00:00
feat. 更新API到4.27.0
This commit is contained in:
parent
e3a43a807a
commit
5105a9a09d
1
.husky/.gitignore
vendored
1
.husky/.gitignore
vendored
@ -1 +0,0 @@
|
||||
_
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
@ -140,7 +140,7 @@ banner({ type: 0 }).then((res) => {
|
||||
|
||||
## 使用文档
|
||||
|
||||
[文档地址](https://music-api.focalors.ltd/docs/#/)
|
||||
[文档地址](https://docs-neteasecloudmusicapi.vercel.app)
|
||||
|
||||
## 功能特性
|
||||
|
||||
@ -453,6 +453,11 @@ banner({ type: 0 }).then((res) => {
|
||||
307. 歌词摘录 - 我的歌词本
|
||||
308. 歌词摘录 - 添加/修改摘录歌词
|
||||
309. 歌词摘录 - 删除摘录歌词
|
||||
310. 广播电台 - 分类/地区信息
|
||||
311. 广播电台 - 我的收藏
|
||||
312. 广播电台 - 电台信息
|
||||
313. 广播电台 - 全部电台
|
||||
314. 广播电台 - 收藏/取消收藏电台
|
||||
|
||||
## 单元测试
|
||||
|
||||
|
11
module/broadcast_category_region_get.js
Normal file
11
module/broadcast_category_region_get.js
Normal file
@ -0,0 +1,11 @@
|
||||
// 广播电台 - 分类/地区信息
|
||||
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
const data = {}
|
||||
return request(
|
||||
`/api/voice/broadcast/category/region/get`,
|
||||
data,
|
||||
createOption(query),
|
||||
)
|
||||
}
|
12
module/broadcast_channel_collect_list.js
Normal file
12
module/broadcast_channel_collect_list.js
Normal file
@ -0,0 +1,12 @@
|
||||
// 广播电台 - 我的收藏
|
||||
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
contentType: 'BROADCAST',
|
||||
limit: query.limit || '99999',
|
||||
timeReverseOrder: 'true',
|
||||
startDate: '4762584922000',
|
||||
}
|
||||
return request(`/api/content/channel/collect/list`, data, createOption(query))
|
||||
}
|
13
module/broadcast_channel_currentinfo.js
Normal file
13
module/broadcast_channel_currentinfo.js
Normal file
@ -0,0 +1,13 @@
|
||||
// 广播电台 - 电台信息
|
||||
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
channelId: query.id,
|
||||
}
|
||||
return request(
|
||||
`/api/voice/broadcast/channel/currentinfo`,
|
||||
data,
|
||||
createOption(query),
|
||||
)
|
||||
}
|
13
module/broadcast_channel_list.js
Normal file
13
module/broadcast_channel_list.js
Normal file
@ -0,0 +1,13 @@
|
||||
// 广播电台 - 全部电台
|
||||
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
categoryId: query.categoryId || '0',
|
||||
regionId: query.regionId || '0',
|
||||
limit: query.limit || '20',
|
||||
lastId: query.lastId || '0',
|
||||
score: query.score || '-1',
|
||||
}
|
||||
return request(`/api/voice/broadcast/channel/list`, data, createOption(query))
|
||||
}
|
12
module/broadcast_sub.js
Normal file
12
module/broadcast_sub.js
Normal file
@ -0,0 +1,12 @@
|
||||
// 广播电台 - 收藏/取消收藏电台
|
||||
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
query.t = query.t == 1 ? 'false' : 'true'
|
||||
const data = {
|
||||
contentType: 'BROADCAST',
|
||||
contentId: query.id,
|
||||
cancelCollect: query.t,
|
||||
}
|
||||
return request(`/api/content/interact/collect`, data, createOption(query))
|
||||
}
|
@ -325,6 +325,11 @@
|
||||
307. 歌词摘录 - 我的歌词本
|
||||
308. 歌词摘录 - 添加/修改摘录歌词
|
||||
309. 歌词摘录 - 删除摘录歌词
|
||||
310. 广播电台 - 分类/地区信息
|
||||
311. 广播电台 - 我的收藏
|
||||
312. 广播电台 - 电台信息
|
||||
313. 广播电台 - 全部电台
|
||||
314. 广播电台 - 收藏/取消收藏电台
|
||||
|
||||
## 安装
|
||||
|
||||
@ -5086,6 +5091,52 @@ let data = encodeURIComponent(
|
||||
|
||||
**调用例子:** `/song/lyrics/mark?id=2083850`
|
||||
|
||||
### 广播电台 - 分类/地区信息
|
||||
|
||||
说明: 调用此接口, 获取广播电台 - 分类/地区信息
|
||||
|
||||
**接口地址:** `/broadcast/category/region/get`
|
||||
|
||||
**调用例子:** `/broadcast/category/region/get`
|
||||
|
||||
### 广播电台 - 我的收藏
|
||||
|
||||
说明: 调用此接口, 获取广播电台 - 我的收藏
|
||||
|
||||
**可选参数 :**
|
||||
|
||||
`limit` : 返回数量 , 默认为 99999
|
||||
|
||||
**接口地址:** `/broadcast/channel/collect/list`
|
||||
|
||||
**调用例子:** `/broadcast/channel/collect/list`
|
||||
|
||||
### 广播电台 - 电台信息
|
||||
|
||||
说明: 调用此接口, 传入电台id, 获取广播电台 - 电台信息
|
||||
|
||||
**必选参数:**
|
||||
|
||||
`id`: 电台id
|
||||
|
||||
**接口地址:** `/broadcast/channel/currentinfo`
|
||||
|
||||
**调用例子:** `/broadcast/channel/currentinfo?id=5`
|
||||
|
||||
### 广播电台 - 全部电台
|
||||
|
||||
说明: 调用此接口, 获取广播电台 - 全部电台
|
||||
|
||||
**可选参数 :**
|
||||
|
||||
`categoryId` : 类别id, 默认为 0,可从“广播电台 - 分类/地区信息”接口获取
|
||||
|
||||
`regionId` : 地区id, 默认为 0,可从“广播电台 - 分类/地区信息”接口获取
|
||||
|
||||
**接口地址:** `/broadcast/channel/list`
|
||||
|
||||
**调用例子:** `/broadcast/channel/list`
|
||||
|
||||
## 离线访问此文档
|
||||
|
||||
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
||||
|
@ -85,6 +85,7 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>网易云音乐 API <span id="api-version"></span></h1>
|
||||
<p>本项目基于binaryify的网易云API二改, 添加了解灰接口</p>
|
||||
<p>当你看到这个页面时,这个服务已经成功跑起来了~</p>
|
||||
<p class="current-url"><span id="current-url"></span></p>
|
||||
<a href="/docs">查看文档</a>
|
||||
|
@ -183,13 +183,13 @@ const createRequest = (uri, data, options) => {
|
||||
if (crypto === 'eapi') {
|
||||
// 使用eapi加密
|
||||
data.header = header
|
||||
data.e_r =
|
||||
options.e_r != undefined
|
||||
data.e_r = toBoolean(
|
||||
options.e_r !== undefined
|
||||
? options.e_r
|
||||
: data.e_r != undefined
|
||||
: data.e_r !== undefined
|
||||
? data.e_r
|
||||
: APP_CONF.encryptResponse // 用于加密接口返回值
|
||||
data.e_r = toBoolean(data.e_r)
|
||||
: APP_CONF.encryptResponse,
|
||||
) // 用于加密接口返回值
|
||||
encryptData = encrypt.eapi(uri, data)
|
||||
url = APP_CONF.apiDomain + '/eapi/' + uri.substr(5)
|
||||
} else if (crypto === 'api') {
|
||||
@ -259,7 +259,7 @@ const createRequest = (uri, data, options) => {
|
||||
x.replace(/\s*Domain=[^(;|$)]+;*/, ''),
|
||||
)
|
||||
try {
|
||||
if (data.e_r) {
|
||||
if (crypto === 'eapi' && data.e_r) {
|
||||
// eapi接口返回值被加密,需要解密
|
||||
answer.body = encrypt.eapiResDecrypt(
|
||||
body.toString('hex').toUpperCase(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user