| files_slack | R Documentation |
upload/info/list/delete files
files_slack(
slack_method = "files.upload",
...,
token = Sys.getenv("SLACK_API_TOKEN"),
rate_limit
)
slack_method |
character, method to invoke, Default: 'files.upload' |
... |
arguments to pass to chat methods |
token |
Character. Your Slack API token. |
rate_limit |
Integer. The maximum number of calls to make to this function per minute. If NULL, calls will not be rate-limited. If unset, calls will be limited per the rate limit guides in the Slack api method documentation, if known. Note: If a limit is set for this method in any call in this session, that rate limit will be respected until rate_limit is set to NULL. Default: None. |
files methods available to post to
files.upload
files.delete
files.info
files.list
For a full list of chat methods see here
httr response
## Not run:
files_slack(
method = 'files.upload',
channel = "general",
token = Sys.getenv('SLACK_API_TOKEN'),
content = 'wow'
)
tf <- tempfile(fileext = '.r')
cat(
utils::capture.output(utils::sessionInfo()),
file = tf,
sep = '\n'
)
files_slack(
method = 'files.upload',
channel = "general",
token = Sys.getenv('SLACK_API_TOKEN'),
file = tf,
filename = 'sessionInfo.R',
filetype = 'r',
initial_comment = 'here is my session info',
title = 'R sessionInfo'
)
unlink(tf)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.