feat: 新增评论举报接口 && bump 4.32.1

This commit is contained in:
ElyPrism 2026-05-16 10:21:46 +08:00
parent 15fa49a2e8
commit a366983e99
No known key found for this signature in database
14 changed files with 324 additions and 285 deletions

View File

@ -1,9 +1,8 @@
name: Publish Docker image name: Publish Docker image
on: on:
push: release:
branches: [main] types: [published]
tags: ['v*']
workflow_dispatch: workflow_dispatch:
permissions: permissions:
@ -12,6 +11,7 @@ permissions:
jobs: jobs:
build-and-push: build-and-push:
if: startsWith(github.event.release.tag_name, 'v')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -2,12 +2,16 @@
name: Release name: Release
on: on:
release:
types: [published]
workflow_dispatch: workflow_dispatch:
jobs: jobs:
release: release:
if: startsWith(github.event.release.tag_name, 'v')
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
id-token: write
contents: read contents: read
packages: write packages: write
steps: steps:
@ -21,9 +25,7 @@ jobs:
registry-url: 'https://registry.npmjs.org/' registry-url: 'https://registry.npmjs.org/'
- run: npm install - run: npm install
- name: Publish to NPM - name: Publish to NPM
run: npm publish --access public run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# 发布到 GitHub Packages # 发布到 GitHub Packages
- name: Setup Node.js for GitHub Packages - name: Setup Node.js for GitHub Packages

View File

@ -1,9 +1,7 @@
<p align="center"> <p align="center">
<img src="./public/docs/netease.png" alt="网易云音乐 API Enhanced Logo" width="120" height="120" /> <img src="./public/static/neteaselogo.png" alt="网易云音乐 API Enhanced Logo" />
</p> </p>
<h1 align="center">NeteaseCloudMusicAPI Enhanced</h1>
<p align="center"> <p align="center">
<a href="https://www.npmjs.com/package/@neteasecloudmusicapienhanced/api"> <a href="https://www.npmjs.com/package/@neteasecloudmusicapienhanced/api">
<img src="https://img.shields.io/npm/v/@neteasecloudmusicapienhanced/api?style=flat-square" alt="NPM Version" /> <img src="https://img.shields.io/npm/v/@neteasecloudmusicapienhanced/api?style=flat-square" alt="NPM Version" />
@ -38,8 +36,8 @@
> >
> ## 注意 > ## 注意
> >
> - 本项目是一个高度去中心化的第三方 API其维护都由社区志愿者使用`Pull Request`完成。 > - 本项目是自由项目, 不带任何担保, 在基于`MIT License`的许可下, 任何人都可以自由使用、修改和分发本项目的代码, 包括用于商业目的.
> - 使用本项目时请务必遵守相关法律法规,遵守`MIT`协议, 尊重网易云音乐的服务条款。 > - 该项目是个合作计划, 有很多人参与了此次贡献, 前往 [Contributors](https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced/graphs/contributors) 页面查看所有贡献者
> - 原作者项目 [Binaryify/NeteaseCloudMusicApi](https://github.com/binaryify/NeteaseCloudMusicApi) 并非完全停止维护, 你可以在 [NeteaseCloudMusicApi 的 NPMJS 页面](https://www.npmjs.com/package/NeteaseCloudMusicApi) 查看最新版本信息。 > - 原作者项目 [Binaryify/NeteaseCloudMusicApi](https://github.com/binaryify/NeteaseCloudMusicApi) 并非完全停止维护, 你可以在 [NeteaseCloudMusicApi 的 NPMJS 页面](https://www.npmjs.com/package/NeteaseCloudMusicApi) 查看最新版本信息。
> - 感谢尊重和理解! > - 感谢尊重和理解!
@ -231,15 +229,14 @@ pnpm test
| 语言 | 作者 | 地址 | 类型 | | 语言 | 作者 | 地址 | 类型 |
|--------|---------------------------------------------|------------------------------------------------------------------------------------------|-----| |--------|---------------------------------------------|------------------------------------------------------------------------------------------|-----|
| Java | [JackuXL](https://github.com/JackuXL) | [NeteaseCloudMusicApi-SDK](https://github.com/JackuXL/NeteaseCloudMusicApi-SDK) | 第三方 | | Java | [JackuXL](https://github.com/JackuXL) | [NeteaseCloudMusicApi-SDK](https://github.com/JackuXL/NeteaseCloudMusicApi-SDK) | 第三方 |
| Java | [1015770492](https://github.com/1015770492) | https://github.com/1015770492/yumbo-music-utils | 第三方 | | Java | [1015770492](https://github.com/1015770492) | [yumbo-music-utils](https://github.com/1015770492/yumbo-music-utils) | 第三方 |
| Python | [盧瞳](https://github.com/2061360308) | [NeteaseCloudMusic_PythonSDK](https://github.com/2061360308/NeteaseCloudMusic_PythonSDK) | 第三方 | | Python | [盧瞳](https://github.com/2061360308) | [NeteaseCloudMusic_PythonSDK](https://github.com/2061360308/NeteaseCloudMusic_PythonSDK) | 第三方 |
| Swift | [Lincb522](https://github.com/Lincb522) | [NeteaseCloudMusicApi-Swift](https://github.com/Lincb522/NeteaseCloudMusicAPI-Swift) | 第三方 | | Swift | [Lincb522](https://github.com/Lincb522) | [NeteaseCloudMusicApi-Swift](https://github.com/Lincb522/NeteaseCloudMusicAPI-Swift) | 第三方 |
| Rust | [SPlayer-Dev](https://github.com/splayer-dev) | [ncm-api-rs](https://github.com/SPlayer-Dev/ncm-api-rs) | 第三方 |
### 依赖此项目的优秀开源项目 ### 依赖此项目的优秀开源项目
- [imsyy/splayer](https://github.com/imsyy/splayer)
- [qier2222/YesPlayMusic](https://github.com/qier222/YesPlayMusic) - [qier2222/YesPlayMusic](https://github.com/qier222/YesPlayMusic)
- [MaigoLabs/amaoke.app](https://github.com/MaigoLabs/amaoke.app) - [MaigoLabs/amaoke.app](https://github.com/MaigoLabs/amaoke.app)

View File

@ -1,15 +0,0 @@
// 对某一首歌曲发表评论
const createOption = require('../util/option.js')
module.exports = (query, request) => {
const data = {
threadId: 'R_SO_4_' + query.id,
content: query.content,
resourceType: '0',
resourceId: '0',
expressionPicId: '-1',
bubbleId: '-1',
checkToken: '',
}
return request('/api/resource/comments/add', data, createOption(query))
}

View File

@ -1,13 +0,0 @@
// 回复评论
const createOption = require('../util/option.js')
module.exports = (query, request) => {
const data = {
threadId: query.id,
commentId: query.commentId,
content: query.content,
resourceType: '0',
resourceId: '0',
}
return request(`/api/v1/resource/comments/reply`, data, createOption(query))
}

View File

@ -1,10 +1,11 @@
// 删除评论 // 举报评论
const createOption = require('../util/option.js') const createOption = require('../util/option.js')
module.exports = (query, request) => { module.exports = (query, request) => {
const data = { const data = {
commentId: query.cid,
threadId: 'R_SO_4_' + query.id, threadId: 'R_SO_4_' + query.id,
commentId: query.cid,
reason: query.reason,
} }
return request(`/api/resource/comments/delete`, data, createOption(query)) return request(`/api/report/reportcomment`, data, createOption(query))
} }

View File

@ -3,9 +3,5 @@
const createOption = require('../util/option.js') const createOption = require('../util/option.js')
module.exports = (query, request) => { module.exports = (query, request) => {
const data = {} const data = {}
return request( return request(`/api/vip-center-bff/task/sign`, data, createOption(query))
`/api/vip-center-bff/task/sign`,
data,
createOption(query, 'weapi'),
)
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@neteasecloudmusicapienhanced/api", "name": "@neteasecloudmusicapienhanced/api",
"version": "4.32.0", "version": "4.32.1",
"description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced) || 网易云音乐 API 备份 + 增强 || 本项目自原版v4.28.0版本后开始自行维护", "description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced) || 网易云音乐 API 备份 + 增强 || 本项目自原版v4.28.0版本后开始自行维护",
"scripts": { "scripts": {
"dev": "nodemon app.js", "dev": "nodemon app.js",
@ -65,8 +65,8 @@
"data" "data"
], ],
"dependencies": { "dependencies": {
"@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.2.4", "@neteasecloudmusicapienhanced/unblockmusic-utils": "^0.3.1",
"axios": "^1.15.0", "axios": "^1.16.1",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"dotenv": "^17.4.2", "dotenv": "^17.4.2",
"express": "^5.2.1", "express": "^5.2.1",
@ -88,13 +88,13 @@
"@types/express-fileupload": "^1.5.1", "@types/express-fileupload": "^1.5.1",
"@types/mocha": "^10.0.10", "@types/mocha": "^10.0.10",
"@types/node": "25.5.0", "@types/node": "25.5.0",
"@typescript-eslint/eslint-plugin": "^8.58.2", "@typescript-eslint/eslint-plugin": "^8.59.3",
"@typescript-eslint/parser": "^8.58.2", "@typescript-eslint/parser": "^8.59.3",
"eslint": "^9.39.4", "eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-html": "^8.1.4", "eslint-plugin-html": "^8.1.4",
"eslint-plugin-prettier": "^5.5.5", "eslint-plugin-prettier": "^5.5.5",
"globals": "^17.5.0", "globals": "^17.6.0",
"husky": "^9.1.7", "husky": "^9.1.7",
"intelli-espower-loader": "^1.1.0", "intelli-espower-loader": "^1.1.0",
"lint-staged": "^16.4.0", "lint-staged": "^16.4.0",

392
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -5128,43 +5128,6 @@ let data = encodeURIComponent(
**调用例子 :** `/voicelist/my/created` **调用例子 :** `/voicelist/my/created`
### 发布评论
说明 : 登录后调用此接口, 传入评论线程 id, 评论内容等信息, 发布评论
**必选参数 :**
`id`: 歌曲id
`content`: 评论内容
**接口地址 :** `/comment/add`
**调用例子 :** `/comment/add?id=2058263032&content=这首歌太棒了!`
### 删除评论
说明 : 登录后调用此接口, 传入评论 id, 删除评论
**必选参数 :**
`cid`: 评论 id
`id`: 歌曲id
**接口地址 :** `/comment/delete`
**调用例子 :** `/comment/delete?threadId=2058263032&commentId=123456789`
### 回复评论
说明 : 登录后调用此接口, 传入歌曲 id, 回复内容等信息, 回复评论
**必选参数 :**
`id`: 歌曲id
`commentId`: 被回复的评论 id
`content`: 回复内容
**接口地址 :** `/comment/reply`
**调用例子 :** `/comment/reply?id=2058263032&commentId=123456789&content=我也觉得这首歌很棒!`
### DIFM电台 - 分类 ### DIFM电台 - 分类
@ -5330,6 +5293,22 @@ let data = encodeURIComponent(
**调用例子 :** `/song/copyright/rcmd?songid=27946878` **调用例子 :** `/song/copyright/rcmd?songid=27946878`
### 举报评论
说明 : 登录后调用此接口, 传入歌曲 id 和评论 id, 举报评论
**必选参数 :**
`id`: 歌曲 id
`cid`: 评论 id
`reason`: 举报理由
**接口地址 :** `/comment/report`
**调用例子 :* `/comment/report?id=2058263032&cid=123456789&reason=人身攻击`
## 离线访问此文档 ## 离线访问此文档
此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问 此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问

View File

@ -9,7 +9,50 @@
<meta name="description" content="Description"> <meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="referrer" content="never"> <meta name="referrer" content="never">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css"> <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" id="theme-css">
<style>
.theme-toggle {
position: fixed;
bottom: 24px;
right: 24px;
z-index: 999;
width: 44px;
height: 44px;
border-radius: 50%;
border: 1px solid rgba(255,255,255,0.1);
background: rgba(30,30,46,0.75);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
color: #fff;
font-size: 20px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 2px 12px rgba(0,0,0,0.15);
transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
outline: none;
padding: 0;
line-height: 1;
user-select: none;
}
.theme-toggle:hover {
transform: scale(1.12) rotate(12deg);
box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.theme-toggle:active {
transform: scale(0.92);
}
.theme-toggle.light {
background: rgba(255,255,255,0.85);
color: #333;
border-color: rgba(0,0,0,0.08);
}
html, body, .sidebar, .content, .markdown-section,
.sidebar-nav, .search, .docsify-pagination-container {
transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
</style>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script> <script>
(adsbygoogle = window.adsbygoogle || []).push({ (adsbygoogle = window.adsbygoogle || []).push({
@ -20,7 +63,46 @@
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<button class="theme-toggle" id="themeToggle" aria-label="Toggle theme">🌙</button>
</body> </body>
<script>
(function() {
var STORAGE_KEY = 'docsify-theme';
var link = document.getElementById('theme-css');
var btn = document.getElementById('themeToggle');
var LIGHT_URL = '//unpkg.com/docsify/lib/themes/vue.css';
var DARK_URL = '//unpkg.com/docsify/lib/themes/dark.css';
function setTheme(theme) {
link.href = theme === 'dark' ? DARK_URL : LIGHT_URL;
btn.textContent = theme === 'dark' ? '☀️' : '🌙';
btn.className = 'theme-toggle' + (theme === 'dark' ? '' : ' light');
localStorage.setItem(STORAGE_KEY, theme);
}
function toggleTheme() {
var isDark = link.href.includes('dark');
setTheme(isDark ? 'light' : 'dark');
}
var saved = localStorage.getItem(STORAGE_KEY);
if (saved) {
setTheme(saved);
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
setTheme('dark');
}
btn.addEventListener('click', toggleTheme);
try {
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function(e) {
if (!localStorage.getItem(STORAGE_KEY)) {
setTheme(e.matches ? 'dark' : 'light');
}
});
} catch(e) {}
})();
</script>
<script> <script>
window.$docsify = { window.$docsify = {
name: '网易云音乐 API Enhanced', name: '网易云音乐 API Enhanced',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
public/static/2169.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 KiB