0

How do I get the comments added to a comment in the in the Box REST API?

For example, how would I return the comments (marked in red) for the comment (marked in black)?

enter image description here

4

1 回答 1

2

它们应该包含在文件的列表注释中。唯一的区别是回复评论的is_reply_comment字段设置为 true。

请注意,返回的评论的顺序很重要。由于回复只能是一个级别的深度,因此回复评论始终与其上方的第一个非回复评论相关联。

这是一个示例响应,包括评论和对第一条评论的回复:

GET https://api.box.com/2.0/files/28785720644/comments

{
  "total_count": 2,
  "offset": 0,
  "limit": 100,
  "entries": [
    {
      "type": "comment",
      "id": "63003535",
      "is_reply_comment": false,
      "message": "First message",
      "created_by": {
        "type": "user",
        "id": "221860571",
        "name": "Name",
        "login": "login@gmail.com"
      },
      "created_at": "2015-04-14T17:49:07-07:00"
    },
    {
      "type": "comment",
      "id": "63003537",
      "is_reply_comment": true,
      "message": "Reply message",
      "created_by": {
        "type": "user",
        "id": "221860571",
        "name": "Name",
        "login": "login@gmail.com"
      },
      "created_at": "2015-04-14T17:49:07-07:00"
    }
  ]
}
于 2015-04-15T00:59:50.013 回答