Description Usage Arguments Value Note Author(s) References See Also Examples
Sends basic text to a slack channel. Calls the chat.postMessage method on the Slack Web API. Information on this method can be found here: https://api.slack.com/methods/chat.postMessage
1 2 3 4 5 6 7 8 9 10 11 | text_slackr(text, ..., preformatted = TRUE,
channel = Sys.getenv("SLACK_CHANNEL"),
username = Sys.getenv("SLACK_USERNAME"),
icon_emoji = Sys.getenv("SLACK_ICON_EMOJI"),
api_token = Sys.getenv("SLACK_API_TOKEN"))
textSlackr(text, ..., preformatted = TRUE,
channel = Sys.getenv("SLACK_CHANNEL"),
username = Sys.getenv("SLACK_USERNAME"),
icon_emoji = Sys.getenv("SLACK_ICON_EMOJI"),
api_token = Sys.getenv("SLACK_API_TOKEN"))
|
text |
The character vector to be posted |
... |
Optional arguments such as: as_user, parse, unfurl_links, etc. |
preformatted |
Should the text be sent as preformatted text. Defaults to TRUE |
channel |
The name of the channels to which the DataTable should be sent. Prepend channel names with a hashtag. Prepend private-groups with nothing. Prepend direct messages with an @ |
username |
what user should the bot be named as (chr) |
icon_emoji |
what emoji to use (chr) |
api_token |
your full slack.com API token |
httr
response object (invislbly)
You can pass in add_user=TRUE
as part of the ...
parameters and the Slack API
will post the message as your logged-in user account (this will override anything set in
username
)
Quinn Weber [aut], Bob Rudis [ctb]
https://github.com/hrbrmstr/slackr/pull/11
https://api.slack.com/methods/chat.postMessage
1 2 3 4 5 | ## Not run:
slackr_setup()
text_slackr('hello world', as_user=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.