An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        

# slack-users [![NPM version](https://img.shields.io/npm/v/slack-users.svg?style=flat)](https://www.npmjs.com/package/slack-users) [![NPM downloads](https://img.shields.io/npm/dm/slack-users.svg?style=flat)](https://npmjs.org/package/slack-users) [![Build Status](https://img.shields.io/travis/doowb/slack-users.svg?style=flat)](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._