mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-03-21 11:03:15 +00:00
feat: Add user playlist endpoints & domain overrides (bump 4.30.1) (#105)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
a19418bbb6
commit
2a0b54e442
@ -1,5 +1,8 @@
|
||||
# 更新日志
|
||||
|
||||
### 4.30.1 | 2026.02.11
|
||||
- feat: Add user playlist endpoints & domain overrides (#105)
|
||||
|
||||
### 4.30.0 | 2026.02.06
|
||||
- feat: 新增音乐人黑胶会员任务接口 `/musician/vip/tasks` (#95)
|
||||
- feat: 自动构建: 添加Windows、Linux、macOS预编译二进制文件 (#88)
|
||||
|
||||
14
module/user_playlist_collect.js
Normal file
14
module/user_playlist_collect.js
Normal file
@ -0,0 +1,14 @@
|
||||
// 获取用户的收藏歌单列表
|
||||
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
limit: query.limit || '100',
|
||||
offset: query.offset || '0',
|
||||
userId: query.uid,
|
||||
isWebview: 'true',
|
||||
includeRedHeart: 'true',
|
||||
includeTop: 'true',
|
||||
}
|
||||
return request(`/api/user/playlist/collect`, data, createOption(query))
|
||||
}
|
||||
14
module/user_playlist_create.js
Normal file
14
module/user_playlist_create.js
Normal file
@ -0,0 +1,14 @@
|
||||
// 获取用户的创建歌单列表
|
||||
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
limit: query.limit || '100',
|
||||
offset: query.offset || '0',
|
||||
userId: query.uid,
|
||||
isWebview: 'true',
|
||||
includeRedHeart: 'true',
|
||||
includeTop: 'true',
|
||||
}
|
||||
return request(`/api/user/playlist/create`, data, createOption(query))
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@neteasecloudmusicapienhanced/api",
|
||||
"version": "4.30.0",
|
||||
"version": "4.30.1",
|
||||
"description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced) || 网易云音乐 API 备份 + 增强 || 本项目自原版v4.28.0版本后开始自行维护",
|
||||
"scripts": {
|
||||
"dev": "nodemon app.js",
|
||||
@ -66,14 +66,18 @@
|
||||
"data"
|
||||
],
|
||||
"dependencies": {
|
||||
"@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.2.2",
|
||||
"axios": "^1.13.5",
|
||||
"@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.2.2",
|
||||
"axios": "^1.13.5",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dotenv": "^17.2.4",
|
||||
"dotenv": "^17.2.4",
|
||||
"express": "^5.2.1",
|
||||
"express-fileupload": "^1.5.2",
|
||||
"md5": "^2.3.0",
|
||||
"music-metadata": "^11.12.0",
|
||||
"music-metadata": "^11.12.0",
|
||||
"node-forge": "^1.3.3",
|
||||
"pac-proxy-agent": "^7.2.0",
|
||||
"qrcode": "^1.5.4",
|
||||
|
||||
@ -4883,6 +4883,43 @@ let data = encodeURIComponent(
|
||||
|
||||
**调用例子:** `/vip/sign/info`
|
||||
|
||||
|
||||
### 用户的创建歌单列表
|
||||
|
||||
说明 : 调用此接口, 传入用户id, 获取用户的创建歌单列表
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
`uid`: 用户 id
|
||||
|
||||
**可选参数 :**
|
||||
|
||||
`limit` : 返回数量 , 默认为 100
|
||||
|
||||
`offset` : 偏移数量,用于分页 ,如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0
|
||||
|
||||
**接口地址 :** `/user/playlist/create`
|
||||
|
||||
**调用例子 :** `/user/playlist/create?uid=32953014`
|
||||
|
||||
### 用户的收藏歌单列表
|
||||
|
||||
说明 : 调用此接口, 传入用户id, 获取用户的收藏歌单列表
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
`uid`: 用户 id
|
||||
|
||||
**可选参数 :**
|
||||
|
||||
`limit` : 返回数量 , 默认为 100
|
||||
|
||||
`offset` : 偏移数量,用于分页 ,如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0
|
||||
|
||||
**接口地址 :** `/user/playlist/collect`
|
||||
|
||||
**调用例子 :** `/user/playlist/collect?uid=32953014`
|
||||
|
||||
## 离线访问此文档
|
||||
|
||||
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问
|
||||
|
||||
@ -194,11 +194,11 @@ const createRequest = (uri, data, options) => {
|
||||
// 根据加密方式处理
|
||||
switch (crypto) {
|
||||
case 'weapi':
|
||||
headers['Referer'] = DOMAIN
|
||||
headers['Referer'] = options.domain || DOMAIN
|
||||
headers['User-Agent'] = options.ua || chooseUserAgent('weapi')
|
||||
data.csrf_token = csrfToken
|
||||
encryptData = encrypt.weapi(data)
|
||||
url = DOMAIN + '/weapi/' + uri.substr(5)
|
||||
url = (options.domain || DOMAIN) + '/weapi/' + uri.substr(5)
|
||||
break
|
||||
|
||||
case 'linuxapi':
|
||||
@ -206,10 +206,10 @@ const createRequest = (uri, data, options) => {
|
||||
options.ua || chooseUserAgent('linuxapi', 'linux')
|
||||
encryptData = encrypt.linuxapi({
|
||||
method: 'POST',
|
||||
url: DOMAIN + uri,
|
||||
url: (options.domain || DOMAIN) + uri,
|
||||
params: data,
|
||||
})
|
||||
url = DOMAIN + '/api/linux/forward'
|
||||
url = (options.domain || DOMAIN) + '/api/linux/forward'
|
||||
break
|
||||
|
||||
case 'eapi':
|
||||
@ -249,9 +249,9 @@ const createRequest = (uri, data, options) => {
|
||||
: ENCRYPT_RESPONSE,
|
||||
)
|
||||
encryptData = encrypt.eapi(uri, data)
|
||||
url = API_DOMAIN + '/eapi/' + uri.substr(5)
|
||||
url = (options.domain || API_DOMAIN) + '/eapi/' + uri.substr(5)
|
||||
} else if (crypto === 'api') {
|
||||
url = API_DOMAIN + uri
|
||||
url = (options.domain || API_DOMAIN) + uri
|
||||
encryptData = data
|
||||
}
|
||||
break
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user