Appearance
登录后调用此接口,传入用户 id, 可以获取用户历史评论
/user/comment/history
GET
POST
user_comment_history
uid
limit
time
GET /user/comment/history?uid=32953014 GET /user/comment/history?uid=32953014&limit=1&time=1616217577564
import { userCommentHistory } from 'hana-music-api'; const result = await userCommentHistory({ uid: '32953014', }); console.log(result.body);
body.code 收紧;body.data.comments、body.data.hotComments 是可以没有的路径:没有历史评论或未登录时上游返回 null(录制 user_comment_history.empty.json、user_comment_history.anonymous.json),缺失或 null 都照常返回,出现时每条评论复用 CommentRecord 的字段并补上 beRepliedContent、beRepliedUser、resourceInfo、resourceType、threadId(宽松),commentId 收紧。commentCount、hasMore、reminder 是宽松字段。默认录制 user_comment_history.default.json(账号 599663130)保留 7 条历史评论和 15 条热门评论。结构定义和类型是 UserCommentHistoryBody,见 返回体结构。
body.code
body.data.comments
body.data.hotComments
null
user_comment_history.empty.json
user_comment_history.anonymous.json
CommentRecord
beRepliedContent
beRepliedUser
resourceInfo
resourceType
threadId
commentId
commentCount
hasMore
reminder
user_comment_history.default.json
UserCommentHistoryBody
说明 : 登录后调用此接口,传入用户 id, 可以获取用户历史评论
必选参数 : uid : 用户 id
可选参数 :
limit : 返回数量,默认为 10
time: 上一条数据的 time,第一页不需要传,默认为 0
接口地址 : /user/comment/history
调用例子 :/user/comment/history?uid=32953014/user/comment/history?uid=32953014&limit=1&time=1616217577564 (需要换成自己的用户 id)
/user/comment/history?uid=32953014
/user/comment/history?uid=32953014&limit=1&time=1616217577564
获取用户历史评论
接口信息
/user/comment/historyGET/POSTuser_comment_history请求参数
uidlimittimeHTTP 示例
编程式调用
返回内容
body.code收紧;body.data.comments、body.data.hotComments是可以没有的路径:没有历史评论或未登录时上游返回null(录制user_comment_history.empty.json、user_comment_history.anonymous.json),缺失或null都照常返回,出现时每条评论复用CommentRecord的字段并补上beRepliedContent、beRepliedUser、resourceInfo、resourceType、threadId(宽松),commentId收紧。commentCount、hasMore、reminder是宽松字段。默认录制user_comment_history.default.json(账号 599663130)保留 7 条历史评论和 15 条热门评论。结构定义和类型是UserCommentHistoryBody,见 返回体结构。补充说明
说明 : 登录后调用此接口,传入用户 id, 可以获取用户历史评论
必选参数 :
uid: 用户 id可选参数 :
limit: 返回数量,默认为 10time: 上一条数据的 time,第一页不需要传,默认为 0接口地址 :
/user/comment/history调用例子 :
/user/comment/history?uid=32953014/user/comment/history?uid=32953014&limit=1&time=1616217577564(需要换成自己的用户 id)