跳到主要内容

列出评论

GET/v1/posts/{id}/comments

分页返回帖子的评论树,支持排序、按分集筛选、单个评论串或文本搜索。

请求

Shell
curl -g "https://api.nogitsu.com/v1/posts/{id}/comments"

参数

  • id

    路径必填

    条目的 ID,为 UUID。

    文本

  • sort

    查询可选

    结果的排序方式。

    文本

    允许的值bestnewoldcontroversialunit

    默认值:best

  • unit

    查询可选

    仅限关于此话数的评论,或用 general 表示不关联任何一话的评论。

    多种结构之一

  • thread

    查询可选

    仅限此评论下的评论串。

    文本 (uuid)

  • q

    查询可选

    要搜索的文本。

    文本

  • cursor

    查询可选

    上一页的 nextCursor 值。读取第一页时省略。

    文本

响应

请求成功时返回 200 和以下 JSON:

  • items__schema0 列表
    • id文本 (uuid)
    • author对象可为 null
      • username文本
      • displayName文本
      • avatarUrl文本 (uri)可为 null
    • authorFlair文本可为 null
    • authorProgress对象可为 null
      • trackingStatus文本
        允许的值plannedcurrentcompletedpauseddroppedrewatching
      • progressUnits数字可为 null

        至少 0

      • progressTotal整数可为 null

        0 到 9007199254740991

    • state文本
      允许的值publishedremoveddeleted
    • body对象可为 null
      • blocks多种结构之一 列表
        1. 选项 1

          • type文本
            允许的值paragraph
          • children任意值 列表
        2. 选项 2

          • type文本
            允许的值heading
          • children任意值 列表
        3. 选项 3

          • type文本
            允许的值quote
          • childrenRichTextBlock 列表
        4. 选项 4

          • type文本
            允许的值list
          • isOrderedtrue 或 false
          • items任意值 列表 列表
        5. 选项 5

          • type文本
            允许的值code
          • text文本
    • hasSpoilertrue 或 false
    • unitNumber数字可为 null

      至少 0

    • sourceSpoiler对象可为 null
      • kind文本
        允许的值mangamanhwamanhuawebtoonnovelother
      • unit数字可为 null

        至少 0

    • images对象 列表
      • url文本 (uri)
      • width整数

        0 到 9007199254740991

      • height整数

        0 到 9007199254740991

      • alt文本可为 null
      • variantWidths整数 列表

        0 到 9007199254740991

    • link对象可为 null
      • url文本 (uri)
      • host文本
      • title文本可为 null
      • description文本可为 null
      • image对象可为 null
        • url文本 (uri)
        • width整数

          0 到 9007199254740991

        • height整数

          0 到 9007199254740991

        • alt文本可为 null
        • variantWidths整数 列表

          0 到 9007199254740991

      • isPendingtrue 或 false
    • score整数可为 null

      -9007199254740991 到 9007199254740991

    • reactions对象 列表
      • kind文本
        允许的值lovelaughwowsadclapfirethinkangrypartycry
      • count整数

        0 到 9007199254740991

    • isByPostAuthortrue 或 false
    • isByModeratortrue 或 false
    • createdAt文本 (date-time)
    • editedAt文本 (date-time)可为 null
    • depth整数

      0 到 9007199254740991

    • replyCount整数

      0 到 9007199254740991

    • replies__schema0 列表
  • nextCursor文本可为 null

错误

与所有操作一样,此操作在参数无效时可能返回 400,找不到内容时返回 404,请求过多时返回 429。所有错误的结构都相同。

了解错误