Appearance
调用此接口,传入 type, 资源 id 可获得对应资源热门评论 ( 不需要登录 )
/comment/hot
GET
POST
comment_hot
id
type
limit
offset
before
time
GET /comment/hot?id=186016&type=0
import { commentHot } from 'hana-music-api'; const result = await commentHot({ id: '186016', type: '0', }); console.log(result.body);
body.code、body.hotComments、body.hotComments[].commentId 收紧;每条热门评论复用 CommentRecord。hasMore、total 宽松;topComments 只见过空数组,没有声明,原样保留。无评论资源(录制 comment_hot.empty.json,云盘歌曲 1984488794;私有云盘上传,匿名不可见,total: 0 可能来自匿名不可访问)返回 hotComments: []、total: 0;非空录制 comment_hot.default.json(歌曲 2092595510)保留覆盖各字段的非连续 6 条(原 20 条,context.truncated.length 记原长度)。登录对照先用 login_status 确认 account.anonimousUser: false,只抽查了本批匿名录制中非 null 的路径与类型;登录录制未保留;不对公开结构作相同性断言。
body.code
body.hotComments
body.hotComments[].commentId
CommentRecord
hasMore
total
topComments
comment_hot.empty.json
total: 0
hotComments: []
comment_hot.default.json
context.truncated.length
login_status
account.anonimousUser: false
null
说明 : 调用此接口,传入 type, 资源 id 可获得对应资源热门评论 ( 不需要登录 )
必选参数 :
id : 资源 id
type: 数字,资源类型,对应歌曲,mv, 专辑,歌单,电台, 视频对应以下类型
0: 歌曲 1: mv 2: 歌单 3: 专辑 4: 电台节目 5: 视频 6: 动态 7: 电台
可选参数 : limit: 取出评论数量,默认为 20
offset: 偏移数量,用于分页,如:(评论页数 - 1)*20, 其中 20 为 limit 的值
before: 分页参数,取上一页最后一项的 time 获取下一页数据(获取超过 5000 条评论的时候需要用到)
接口地址 : /comment/hot
调用例子 : /comment/hot?id=186016&type=0
/comment/hot?id=186016&type=0
热门评论
接口信息
/comment/hotGET/POSTcomment_hot请求参数
idtype0: 歌曲
1: mv
2: 歌单
3: 专辑
4: 电台节目
5: 视频
6: 动态
7: 电台
limitoffsetbeforetime获取下一页数据(获取超过 5000 条评论的时候需要用到)HTTP 示例
编程式调用
返回内容
body.code、body.hotComments、body.hotComments[].commentId收紧;每条热门评论复用CommentRecord。hasMore、total宽松;topComments只见过空数组,没有声明,原样保留。无评论资源(录制comment_hot.empty.json,云盘歌曲 1984488794;私有云盘上传,匿名不可见,total: 0可能来自匿名不可访问)返回hotComments: []、total: 0;非空录制comment_hot.default.json(歌曲 2092595510)保留覆盖各字段的非连续 6 条(原 20 条,context.truncated.length记原长度)。登录对照先用login_status确认account.anonimousUser: false,只抽查了本批匿名录制中非null的路径与类型;登录录制未保留;不对公开结构作相同性断言。补充说明
说明 : 调用此接口,传入 type, 资源 id 可获得对应资源热门评论 ( 不需要登录 )
必选参数 :
id: 资源 idtype: 数字,资源类型,对应歌曲,mv, 专辑,歌单,电台, 视频对应以下类型可选参数 :
limit: 取出评论数量,默认为 20offset: 偏移数量,用于分页,如:(评论页数 - 1)*20, 其中 20 为 limit 的值before: 分页参数,取上一页最后一项的time获取下一页数据(获取超过 5000 条评论的时候需要用到)接口地址 :
/comment/hot调用例子 :
/comment/hot?id=186016&type=0