Topic:get

获取指定话题信息。

HTTP 请求

GET /api/topics/{topic_id}

参数

参数名参数位置类型默认值说明
topic_idpathinteger

话题ID

includequerystring

响应中需要包含的关联数据,用 , 分隔。可以为 is_following

响应

话题详情

示例

{
  "code": 0,
  "data": {
    "topic_id": 1,
    "name": "MDClub",
    "cover": {
      "original": "https://mdclub.org/topic-cover/c4/ca/bc03445db47540eea79148252e7a91fe.jpg",
      "small": "https://mdclub.org/topic-cover/c4/ca/bc03445db47540eea79148252e7a91fe_small.jpg",
      "middle": "https://mdclub.org/topic-cover/c4/ca/bc03445db47540eea79148252e7a91fe_middle.jpg",
      "large": "https://mdclub.org/topic-cover/c4/ca/bc03445db47540eea79148252e7a91fe_large.jpg"
    },
    "description": "一个漂亮强大的开源社区系统",
    "article_count": 12,
    "question_count": 16,
    "follower_count": 42,
    "delete_time": 0,
    "relationships": {
      "is_following": true
    }
  }
}

参数说明

参数名 类型 说明
code integer

无任何错误时,状态码为 0

data.topic_id integer

话题ID

data.name string

话题名称

data.cover.original string

封面原图地址

data.cover.small string

小型封面地址

data.cover.middle string

中型封面地址

data.cover.large string

大型封面地址

data.description string

话题描述

data.article_count integer

文章数量

data.question_count integer

提问数量

data.follower_count integer

关注者数量

data.delete_time integer

🔐删除时间

data.relationships.is_following boolean

当前登录用户是否已关注该话题