mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
回复评论
This commit is contained in:
parent
98bb292872
commit
b1ebbf51be
@ -1277,7 +1277,7 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
|
||||
|
||||
**必选参数**
|
||||
|
||||
`t`:1 发送
|
||||
`t`:1 发送, 2 回复
|
||||
|
||||
`tpye`: 数字,资源类型,对应歌曲,mv,专辑,歌单,电台,视频对应以下类型
|
||||
|
||||
@ -1301,6 +1301,8 @@ mp3url 不能直接用 , 可通过 `/song/url` 接口传入歌曲 id 获取具
|
||||
|
||||
`content` :要发送的内容
|
||||
|
||||
`commentId` :回复的评论id
|
||||
|
||||
**调用例子** : `/comment?t=1&type=1&id=5436712&content=test` (往广岛之恋 mv 发送评论: test)
|
||||
|
||||
注意:如给动态发送评论,则不需要传 id,需要传动态的 `threadId`,如:`/comment?t=1&type=6&threadId=A_EV_2_6559519868_32953014&content=test`
|
||||
|
@ -2,7 +2,11 @@
|
||||
|
||||
module.exports = (query, request) => {
|
||||
query.cookie.os = 'pc'
|
||||
query.t = (query.t == 1 ? 'add' : 'delete')
|
||||
query.t = {
|
||||
1: 'add',
|
||||
0: 'delete',
|
||||
2: 'reply'
|
||||
}[query.t]
|
||||
query.type = {
|
||||
0: 'R_SO_4_', // 歌曲
|
||||
1: 'R_MV_5_', // MV
|
||||
@ -23,6 +27,10 @@ module.exports = (query, request) => {
|
||||
data.content = query.content
|
||||
else if(query.t == 'delete')
|
||||
data.commentId = query.commentId
|
||||
else if (query.t == 'reply') {
|
||||
data.commentId = query.commentId
|
||||
data.content = query.content
|
||||
}
|
||||
return request(
|
||||
'POST', `https://music.163.com/weapi/resource/comments/${query.t}`, data,
|
||||
{crypto: 'weapi', cookie: query.cookie, proxy: query.proxy}
|
||||
|
Loading…
x
Reference in New Issue
Block a user