跳转到内容

获取讨论回复列表

获取指定讨论下的回复列表,支持分页。

每条回复包含作者信息、正文(纯文本)、互动数据及 reply_to_id 字段:"0" 表示顶层回复,其他值表示对指定回复的嵌套回复。

CLI安装 CLI

bash
longbridge topic-replies 6993508780031016960
longbridge topic-replies 6993508780031016960 --page 2 --size 20

Request

HTTP MethodGET
HTTP URL/v1/content/topics/:topic_id/comments

Path Parameters

NameTypeRequiredDescription
topic_idstringYES讨论 ID,如 6993508780031016960

Query Parameters

NameTypeRequiredDescription
pageint32NO页码,默认 1
sizeint32NO每页数量,范围 1~50,默认 20

Request Example

Response

Response Headers

  • Content-Type: application/json

Response Example

json
{
  "code": 0,
  "message": "success",
  "data": {
    "items": [
      {
        "id": "7001234567890123456",
        "topic_id": "6993508780031016960",
        "body": "分析得很到位!",
        "reply_to_id": "0",
        "author": {
          "member_id": "10087",
          "name": "李四",
          "avatar": "https://example.com/avatar2.jpg"
        },
        "images": [],
        "likes_count": 5,
        "comments_count": 2,
        "created_at": "1742001500"
      },
      {
        "id": "7001234567890123457",
        "topic_id": "6993508780031016960",
        "body": "估值部分我有不同看法。",
        "reply_to_id": "7001234567890123456",
        "author": {
          "member_id": "10088",
          "name": "王五",
          "avatar": "https://example.com/avatar3.jpg"
        },
        "images": [],
        "likes_count": 1,
        "comments_count": 0,
        "created_at": "1742001800"
      }
    ]
  }
}

Response Status

StatusDescriptionSchema
200返回成功topic_replies_response
500内部错误None

Schemas

topic_replies_response

NameTypeRequiredDescription
itemsobject[]true回复列表
∟ idstringtrue回复 ID
∟ topic_idstringtrue所属讨论 ID
∟ bodystringfalse回复正文(纯文本)
∟ reply_to_idstringfalse父回复 ID,"0" 表示顶层回复
∟ authorobjectfalse作者信息
∟∟ member_idstringfalse作者 member ID
∟∟ namestringfalse作者昵称
∟∟ avatarstringfalse作者头像 URL
∟ imagesobject[]false附图列表
∟∟ urlstringfalse原始图片 URL
∟∟ smstringfalse小缩略图 URL
∟∟ lgstringfalse大缩略图 URL
∟ likes_countint32false点赞数
∟ comments_countint32false嵌套回复数
∟ created_atstringtrue创建时间,Unix 时间戳(秒)