file_manage.Rd
Send, list, retrieve information or Delete a file.
snippet_post(content, channels, ..., token = Sys.getenv("SLACK_API_TOKEN")) file_post(file, channels, ..., token = Sys.getenv("SLACK_API_TOKEN")) file_delete(file, token = Sys.getenv("SLACK_API_TOKEN"))
content | character, content of snippet |
---|---|
channels | character, Channel ID(s) to post file |
... | arguments to pass to API method. |
token | Character. Your Slack API token. Default: Sys.getenv("SLACK_API_TOKEN") |
file | character, file ID |
A list with an additional class corresponding to slack_method
.
For a full list of arguments to pass to file methods see here
if (FALSE) { tf <- tempfile(fileext = '.r') cat( utils::capture.output(utils::sessionInfo()), file = tf, sep = '\n' ) #post the file file_post( channels = "general", token = Sys.getenv('SLACK_API_TOKEN'), file = tf, filename = 'sessionInfo.R', filetype = 'r', title = 'R sessionInfo' ) # delete the file file_delete(file_last()) }