Learn R Programming

slackr (version 2.0.1)

slackr_upload: Send a file to Slack

Description

slackr_upload enables you upload files to Slack and (optionally) post them to one or more channels (if channels is not empty).

Usage

slackr_upload(
  filename,
  title = basename(filename),
  initial_comment = basename(filename),
  channels = "",
  bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN")
)

slackrUpload( filename, title = basename(filename), initial_comment = basename(filename), channels = "", bot_user_oauth_token = Sys.getenv("SLACK_BOT_USER_OAUTH_TOKEN") )

Arguments

filename

path to file

title

title on Slack (optional - defaults to filename)

initial_comment

comment for file on slack (optional - defaults to filename)

channels

Slack channels to save to (optional)

bot_user_oauth_token

Slack bot user OAuth token

Value

httr response object from POST call (invisibly)

References

https://github.com/hrbrmstr/slackr/pull/15/files

See Also

slackr_setup, dev_slackr, save_slackr