Learn R Programming

slackr (version 1.4.2)

slackr_upload: Send a file to Slack

Description

slackrUpload 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 = "",
  api_token = Sys.getenv("SLACK_API_TOKEN"))

slackrUpload(filename, title = basename(filename), initial_comment = basename(filename), channels = "", api_token = Sys.getenv("SLACK_API_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.com channels to save to (optional)

api_token

full API 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