Skip to content
Manage and Interact with multiple Slack teams in R
R Rebol
Branch: master
Clone or download
Latest commit 3164992 Jan 18, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R pass R CMD check Jan 17, 2020
docs update pkgdown Dec 13, 2019
man pass R CMD check Jan 17, 2020
tests init covrpage Dec 13, 2019
vignettes init covrpage Dec 13, 2019
.Rbuildignore init commit Dec 13, 2019
.gitignore init commit Dec 13, 2019
DESCRIPTION Update DESCRIPTION Jan 18, 2020
LICENSE init commit Dec 13, 2019
LICENSE.md init commit Dec 13, 2019
NAMESPACE init commit Dec 13, 2019
README.Rmd use emo in readme Dec 13, 2019
README.md use emo in readme Dec 13, 2019
_pkgdown.yml update pkgdown Dec 13, 2019
slackteams.Rproj init commit Dec 13, 2019

README.md

slackteams

Covrpage Summary Lifecycle: experimental

slackteams is an R package that allows the user to manage multiple Slack teams during a session.

The package queries the slackr-app database to set the environment variables needed by slackr.

Installation

remotes::install_github("yonicd/slackteams")

Create an Incoming Webhook

The following button will create a Slack incoming webhook with the correct scope to your Slack team.

Add to Slack

Button Directions

  1. Click the button
  2. Select the team to install the application
  3. Select the default channel to post to (this can be changed later)
  4. If successful a SLACK_KEY_ID will be returned. 👈 🚨 Keep this Key 🚨
  5. If not successful an error message will be returned.
  6. To keep the data safe you need your team MEMBERID to authenticate the SLACK_KEY_ID. How to locate your Member ID
  7. Paste the output into a json file. Default path that slackteams looks for the file is ~/slackr.json.

slackr.json

{
  "slackr": {
    "key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "memberid": "UABC123"
  },
  "r4ds": {
    "key": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "memberid": "UXYZ456"
  }
}

Basic Usage

library(slackteams)

Load the teams

slackteams::load_teams()
#> The following teams are loaded:
#>   slackr, r4ds

Activate a Team

slackteams::activate_team('r4ds')
#> slackr environment variables are set to 'r4ds' supplied definitions

Post a Message

slackr::slackr('My Spiffy Message')

Activate Another Team

slackteams::activate_team('slackr')
#> slackr environment variables are set to 'slackr' supplied definitions

Post a Message

slackr::slackr('My Other Spiffy Message')
You can’t perform that action at this time.