Use these functions to create and get comments for Box files.
box_comment_create(file_id = NULL, message, comment_id = NULL)
box_comment_get(file_id)
numeric
or character
, file ID at Box.
character
contents of comment.
Note: tagging people with the @user pattern is not yet supported.
numeric
or character
, comment ID at Box.
box_comment_create()
Object with S3 class boxr_comment
.
box_comment_get()
Object with S3 class boxr_comment_list
.
When you create a comment using box_comment_create()
, you have to specify
a file_id
or a comment_id
. If you specify a comment_id
, the comment
will be posted as a reply to that comment.
Use box_comment_get()
to retrieve comments in bulk. This gets all the
comments associated with a file, thus you can specify only a file_id
.
if (FALSE) {
file_id <- 12345
# create comments
x <- box_comment_create(file_id, "Report is ready.")
box_comment_create(comment_id = x$id, message = "Response to a comment")
# get comments
box_comment_get(file_id)
}