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