https://github.com/doowb/slack-users
Get the users of a slack community.
https://github.com/doowb/slack-users
Last synced: about 1 month ago
JSON representation
Get the users of a slack community.
- Host: GitHub
- URL: https://github.com/doowb/slack-users
- Owner: doowb
- License: mit
- Created: 2016-08-29T15:57:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-29T15:58:13.000Z (over 8 years ago)
- Last Synced: 2025-03-07T22:03:07.883Z (about 2 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# slack-users [](https://www.npmjs.com/package/slack-users) [](https://npmjs.org/package/slack-users) [](https://travis-ci.org/doowb/slack-users)
Get the users of a slack community.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save slack-users
```## Usage
```js
var slackUsers = require('slack-users');
```## API
### [slackUsers](index.js#L31)
Get the slack users for the specified team.
**Params**
* `options` **{Object}**: Options object used for getting users.
* `options.team` **{String}**: Name of slack team to get users from.
* `optins.token` **{String}**: Slack token to use when getting users.
* `cb` **{Function}**: Callback functions passing an error if one occurs or an array of users when successful.**Example**
```js
var options = {
team: 'my-slack-team',
token: 'my-slack-token'
};
slackUsers(options, function(err, users) {
if (err) return console.error(err);
console.log(users);
//=> [
//=> {id: '', name: 'doowb', ...},
//=> {id: 'USLACKBOT', name: 'slackbot', ...}
//=> ]
});
```## About
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
Please read the [contributing guide](contributing.md) for avice on opening issues, pull requests, and coding standards.
### Building docs
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install -g verb verb-generate-readme && verb
```### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```### Author
**Brian Woodward**
* [github/doowb](https://github.com/doowb)
* [twitter/doowb](http://twitter.com/doowb)### License
Copyright © 2016, [Brian Woodward](https://github.com/doowb).
Released under the [MIT license](https://github.com/doowb/slack-users/blob/master/LICENSE).***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.30, on August 29, 2016._