librariesio/slackin

Name: slackin

Owner: Libraries.io

Description: Public Slack organizations made easy

Forked from: rauchg/slackin

Created: 2017-04-12 10:26:59.0

Updated: 2017-04-12 10:27:01.0

Pushed: 2017-09-21 11:20:56.0

Homepage: http://rauchg.com/slackin/

Size: 347

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Features

Check out the Demo or read more about the motivations and history behind Slackin.

Usage

Set up Now on your device and run this command:

w -e SLACK_API_TOKEN="<token>" -e SLACK_SUBDOMAIN="<team-name>" now-examples/slackin

Other platforms:

Tips

Your team id is what you use to access your login page on Slack (eg: https://{this}.slack.com).

You can find or generate your API test token at api.slack.com/web ? note that the user you use to generate the token must be an admin. You need to create a dedicated @slackin-inviter user (or similar), mark that user an admin, and use a test token from that dedicated admin user. Note that test tokens have actual permissions so you do not need to create an OAuth 2 app. Also check out the Slack docs on generating a test token.

Important: If you use Slackin in single-channel mode, you'll only be able to invite as many external accounts as paying members you have times 5. If you are not getting invite emails, this might be the reason. Workaround: sign up for a free org, and set up Slackin to point to it (all channels will be visible).

Badges
Realtime (demo)
ipt async defer src="https://slack.yourdomain.com/slackin.js"></script>
 append "?" to the URL for the large version -->
SVG (demo)
 src="https://slack.yourdomain.com/badge.svg">
API

Loading slackin will return a Function that creates a HTTP.Server instance:

rt slackin from 'slackin'

kin.default({
ken: 'yourtoken',                             // required
terval: 1000,
g: 'your-slack-subdomain',                    // required
th: '/some/path/you/host/slackin/under/',     // defaults to '/'
annels: 'channel,channel,...',                // for single channel mode
lent: false                                   // suppresses warnings
isten(3000)

This will show response times from Slack and how many online users you have on the console. The returned http.Server has an app property that is the express application that you can define or override routes on.

All the metadata for your organization can be fetched via a JSON HTTP request to /data.

Caught a Bug?
  1. Fork this repository to your own GitHub account and then clone it to your local device
  2. Uninstall slackin if it's already installed: npm uninstall -g slack
  3. Link it to the global module directory: npm link
  4. Transpile the source code and watch for changes: npm start

Yey! Now can use the slack command everywhere.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.