UNPKG

379 BJavaScriptView Raw
1/**
2 * Example for creating and working with the Slack Web API.
3 */
4
5/* eslint no-console:0 */
6
7var WebClient = require('../lib/clients/web/client');
8
9var token = process.env.SLACK_API_TOKEN || '';
10var web = new WebClient(token);
11
12web.team.info(function teamInfoCb(err, info) {
13 if (err) {
14 console.log('Error:', err);
15 } else {
16 console.log('Team Info:', info);
17 }
18});