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"))

Arguments

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

Value

A list with an additional class corresponding to slack_method.

Details

For a full list of arguments to pass to file methods see here

Examples

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()) }