mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-03-21 11:03:15 +00:00
Compare commits
2 Commits
2e3cf4d451
...
8521c198d3
| Author | SHA1 | Date | |
|---|---|---|---|
| 8521c198d3 | |||
| 4d8c4daa14 |
@ -210,6 +210,7 @@ pnpm test
|
||||
## 贡献与社区
|
||||
|
||||
- 欢迎提交 PR、Issue 参与维护
|
||||
- 要贡献新接口, 请参考[这篇文章](https://www.focalors.ltd/post/how-to-contribute-ncm-api)
|
||||
|
||||
### 致谢
|
||||
|
||||
|
||||
15
module/comment_add.js
Normal file
15
module/comment_add.js
Normal file
@ -0,0 +1,15 @@
|
||||
// 对某一首歌曲发表评论
|
||||
|
||||
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))
|
||||
}
|
||||
@ -3,8 +3,8 @@
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
commentId: query.commentId,
|
||||
threadId: query.threadId,
|
||||
commentId: query.cid,
|
||||
threadId: 'R_SO_4_' + query.id,
|
||||
}
|
||||
return request(`/api/resource/comments/delete`, data, createOption(query))
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
const createOption = require('../util/option.js')
|
||||
module.exports = (query, request) => {
|
||||
const data = {
|
||||
threadId: query.threadId,
|
||||
threadId: query.id,
|
||||
commentId: query.commentId,
|
||||
content: query.content,
|
||||
resourceType: '0',
|
||||
|
||||
@ -5,7 +5,7 @@ module.exports = (query, request) => {
|
||||
const data = {
|
||||
userId: query.uid,
|
||||
time: '0',
|
||||
limit: query.limit || 30,
|
||||
limit: query.limit || 20,
|
||||
offset: query.offset || 0,
|
||||
getcounts: 'true',
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@neteasecloudmusicapienhanced/api",
|
||||
"version": "4.30.2",
|
||||
"version": "4.30.3",
|
||||
"description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced) || 网易云音乐 API 备份 + 增强 || 本项目自原版v4.28.0版本后开始自行维护",
|
||||
"scripts": {
|
||||
"dev": "nodemon app.js",
|
||||
|
||||
@ -783,7 +783,7 @@ tags: 歌单标签
|
||||
**必选参数 :** `uid` : 用户 id
|
||||
|
||||
**可选参数 :**
|
||||
`limit` : 返回数量 , 默认为 30
|
||||
`limit` : 返回数量 , 默认为 20
|
||||
|
||||
`offset` : 偏移数量,用于分页 ,如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0
|
||||
|
||||
@ -5111,25 +5111,37 @@ let data = encodeURIComponent(
|
||||
|
||||
**必选参数 :**
|
||||
|
||||
`threadId`: 评论线程 id, 可通过获取评论接口返回结果的`threadId`参数获取
|
||||
`commentId`: 回复评论 id, 若为回复评论则必填
|
||||
`id`: 歌曲id
|
||||
`content`: 评论内容
|
||||
|
||||
**接口地址 :** `/comment/reply`
|
||||
**接口地址 :** `/comment/add`
|
||||
|
||||
**调用例子 :** `/comment/reply?threadId=R_SO_4_2058263032&content=这首歌太棒了!`
|
||||
**调用例子 :** `/comment/add?id=2058263032&content=这首歌太棒了!`
|
||||
|
||||
### 删除评论
|
||||
|
||||
说明 : 登录后调用此接口, 传入评论 id, 删除评论
|
||||
|
||||
**必选参数 :**
|
||||
`commentId`: 评论 id
|
||||
`threadId`: 评论线程 id, 可通过获取评论接口返回结果的`threadId`参数获取
|
||||
`cid`: 评论 id
|
||||
`id`: 歌曲id
|
||||
|
||||
**接口地址 :** `/comment/delete`
|
||||
|
||||
**调用例子 :** `/comment/delete?threadId=R_SO_4_2058263032&commentId=123456789`
|
||||
**调用例子 :** `/comment/delete?threadId=2058263032&commentId=123456789`
|
||||
|
||||
### 回复评论
|
||||
|
||||
说明 : 登录后调用此接口, 传入歌曲 id, 回复内容等信息, 回复评论
|
||||
|
||||
**必选参数 :**
|
||||
`id`: 歌曲id
|
||||
`commentId`: 被回复的评论 id
|
||||
`content`: 回复内容
|
||||
|
||||
**接口地址 :** `/comment/reply`
|
||||
|
||||
**调用例子 :** `/comment/reply?id=2058263032&commentId=123456789&content=我也觉得这首歌很棒!`
|
||||
|
||||
## 离线访问此文档
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user