add_comment: comment on a Google Drive file

Description Usage Arguments Value See Also Examples

View source: R/comments.R

Description

add a comment to a Google Drive file. These comments are not (currently) anchored, meaning that they're associated with the file as a whole rather than tied to any particular element or line of text.

Usage

1
add_comment(file_id, comment_text, ...)

Arguments

file_id

the ID of a file - or the full URL for accessing it via your browser. See file_metadata for further discussion.

comment_text

a string containing the comment you wish to leave

...

further arguments to pass to httr's POST

Value

a basic comment object, similar to those returned from get_comment

See Also

upload_file for uploading a file, and add_reply for replying to an existing comment.

Examples

1
2
3
4
5
6
## Not run: 
file_id <- list_files(token, max_results = 1)$items[[1]]$id
comment_metadata <- add_comment(token, file_id, comment = text = "I have strong negative opinions
                               about this proposal but no actual idea for how to improve it")

## End(Not run)

noamross/driver documentation built on May 23, 2019, 9:30 p.m.