box_comment_create: Create/get Box comments

Description Usage Arguments Details Value Examples

View source: R/boxr_comment.R

Description

Use these functions to create and get comments for Box files.

Usage

1
2
3
box_comment_create(file_id = NULL, message, comment_id = NULL)

box_comment_get(file_id)

Arguments

file_id

numeric or character, file ID at Box.

message

character contents of comment. Note: tagging people with the @user pattern is not yet supported.

comment_id

numeric or character, comment ID at Box.

Details

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.

Value

box_comment_create()

Object with S3 class boxr_comment.

box_comment_get()

Object with S3 class boxr_comment_list.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
  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)

## End(Not run)

boxr documentation built on Jan. 19, 2021, 5:06 p.m.