-
Notifications
You must be signed in to change notification settings - Fork 1
主题详情及回复
HanJie edited this page May 27, 2020
·
3 revisions
请求方法 | 请求地址 | 是否需要登录 |
---|---|---|
GET | https://v2ex.com/t/{topic_id} | 否 |
路径参数
参数名 | 参数值 | 类型 |
---|---|---|
topic_id | 主题 id | Long |
查询参数
参数名 | 参数值 | 类型 |
---|---|---|
p | 页码值,从 1 开始 | Int |
返回结果:com.imhanjie.v2ex.api.model.Topic
{
"code": 1,
"data": {
"click": 775, // 被点击的次数
"createTime": "1 小时 33 分钟前", // 创建时间
"currentPage": 1, // 当前页码
"id": 675834, // 主题 id
"nodeName": "share", // 所属节点 name
"nodeTitle": "分享发现", // 所属节点 title
"once": "97959", // 当前页面 once 动态码(感谢回复等接口需要用到此值)
"isMyTopic": true, // 是否为我创建的主题
"favoriteParam": "xxxxxx", // 收藏 & 取消收藏主题接口所需要的动态参数
"isFavorite": false, // 是否已收藏
"replies": [ // 回复列表
{
"content": "转租出去?", // 回复内容 HTML 富文本
"id": 9030828, // 回复 id
"no": 1, // 楼层
"thankCount": 0, // 感谢数
"thanked": false, // 当前登录用户是否已感谢此回复
"time": "1 小时 10 分钟前", // 回复时间
"userAvatar": "https://cdn.v2ex.com/gravatar/2930b4bb36b8bcdb5843d66c71026b4e?s\u003d48\u0026d\u003dretro", // 回复人用户头像
"userName": "podel" // 回复人用户名
},
{
"content": "在里面养鸡养鸭,坐等物业赶你走",
"id": 9030856,
"no": 2,
"thankCount": 0,
"thanked": false,
"time": "1 小时 7 分钟前",
"userAvatar": "https://cdn.v2ex.com/gravatar/1750a42f7b729b9b60753e07ae37b6fe?s\u003d48\u0026d\u003dretro",
"userName": "keepeye"
}
],
"richContent": "\u003cp\u003e背景介绍:刚毕业的时候申请的廉租房,一年后才申请下来,当时准备放矿机挖矿的,矿难后房子闲置。中间想着搞个服务器放里面玩,刚好宽带还有一条 100m 电信送的闲置,但是想了大半年也没想好搞个服务器有啥用,想着如果能把房租挣回来也好啊(廉租房不到 200 月租)。\u003c/p\u003e \n\u003ch1\u003e各位大佬有什么高招吗?\u003c/h1\u003e \n\u003cp\u003ePS:租了就没住过,刚抽完号就想退被告知必须走各种流程,中间想退租,被物业和 zf 部门各种恶心(不知道为什么租了容易退租难),不然我也不想占用公共资源,实在是耗不过。\u003c/p\u003e",
"subtleList": [
],
"title": "有个房子空着,搞个服务器玩?", // 主题标题
"totalPage": 1, // 总页数
"userAvatar": "https://cdn.v2ex.com/gravatar/cd318b3d1f39d7c4ef91a9e06f65aadc?s\u003d73\u0026d\u003dretro", // 主题创建人头像
"userName": "ghwolf007" // 主题创建人用户名
}
}
@GET("/t/{topic_id}") fun loadTopic( @Path("topic_id") id: Long, @Query("p") pageIndex: Int ): RestfulResult<Topic>