Skip to content

给评论点赞

调用此接口,传入 type, 资源 id, 和评论 id cid 和 是否点赞参数 t 即可给对

接口信息

项目
接口地址/comment/like
请求方式GET / POST
需要登录
对应模块comment_like
文档分类评论

请求参数

参数类型必填默认值说明
idstring-资源 id, 如歌曲 id,mv id
cidstring-评论 id
tstring-是否点赞,1 为点赞 ,0 为取消点赞
typestring-数字,资源类型,对应歌曲,mv, 专辑,歌单,电台, 视频对应以下类型
0: 歌曲
1: mv
2: 歌单
3: 专辑
4: 电台节目
5: 视频
6: 动态
7: 电台

HTTP 示例

bash
GET /comment/like?id=29178366&cid=12840183&t=1&type=0
GET /comment/like?type=6&cid=1419532712&threadId=A_EV_2_6559519868_32953014&t=0

编程式调用

ts
import { commentLike } from 'hana-music-api'

const result = await commentLike({
  id: '29178366',
  cid: '12840183',
  t: '1',
  type: '0',
})

console.log(result.body)

补充说明

说明 : 调用此接口,传入 type, 资源 id, 和评论 id cid 和 是否点赞参数 t 即可给对 应评论点赞 ( 需要登录 )

必选参数 : id : 资源 id, 如歌曲 id,mv id

cid : 评论 id

t : 是否点赞,1 为点赞 ,0 为取消点赞

type: 数字,资源类型,对应歌曲,mv, 专辑,歌单,电台, 视频对应以下类型

text
0: 歌曲

1: mv

2: 歌单

3: 专辑

4: 电台节目

5: 视频

6: 动态

7: 电台

接口地址 : /comment/like

调用例子 :/comment/like?id=29178366&cid=12840183&t=1&type=0 对应给 https://music.163.com/#/song?id=29178366 最热门的评论点赞

注意:动态点赞不需要传入 id 参数,需要传入动态的 threadId 参数,例如: /comment/like?type=6&cid=1419532712&threadId=A_EV_2_6559519868_32953014&t=0threadId 可通过 /event/user/event 接口获取。

Released under the MIT License.