Description Usage Arguments Details Note See Also Examples
Initialize all the environment variables slackr
will need to use to
work properly.
1 2 3 4 5 6 7 | slackr_setup(channel = "#general", username = "slackr", icon_emoji = "",
incoming_webhook_url = "", api_token = "", config_file = "~/.slackr",
echo = FALSE)
slackrSetup(channel = "#general", username = "slackr", icon_emoji = "",
incoming_webhook_url = "", api_token = "", config_file = "~/.slackr",
echo = FALSE)
|
channel |
default channel to send the output to (chr) defaults to |
username |
the username output will appear from (chr) defaults to |
icon_emoji |
which emoji picture to use (chr) defaults to none (can be left blank in config file as well) |
incoming_webhook_url |
the slack.com URL prefix to use (chr) defaults to none |
api_token |
the Slack full API token (chr) |
config_file |
a configuration file (DCF) - see read.dcf - format with the config values. |
echo |
display the configuration variables (bool) initially |
By default, slackr
(and other functions) will use the #general
room and a username of slackr()
with no emoji.
If a valid file is found at the locaiton pointed to by config_file
, the
values there will be used. The fields should be specified as such in the file:
1 2 3 4 | api_token: YOUR_FULL_API_TOKEN
channel: #general
username: slackr
incoming_webhook_url: https://hooks.slack.com/services/XXXXX/XXXXX/XXXXX
|
You need a Slack account and all your API URLs & tokens setup to use this package.
slackr
, dev_slackr
, save_slackr
,
slackr_upload
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
# reads from default file (i.e. ~/.slackr)
slackr_setup()
# reads from alternate config
slackr_setup(config_file="/path/to/my/slackrconfig)
# the hard way
slackr_setup(channel="#code",
incoming_webhook_url="https://hooks.slack.com/services/XXXXX/XXXXX/XXXXX")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.