Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dmihal/slack
Slack API integration for Meteor
https://github.com/dmihal/slack
Last synced: 23 days ago
JSON representation
Slack API integration for Meteor
- Host: GitHub
- URL: https://github.com/dmihal/slack
- Owner: dmihal
- Created: 2015-01-22T23:17:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-25T02:17:09.000Z (over 9 years ago)
- Last Synced: 2024-10-03T10:40:43.511Z (about 1 month ago)
- Language: JavaScript
- Size: 207 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Integrate your team's Slack site with your Meteor site!
This package is still in an alpha stage, GitHub issues and pull requests are welcome!
Quick Start
-----------
1. Add the Meteor packages [`accounts-slack`](https://atmospherejs.com/acemtp/accounts-slack) and `slack` to your project
```
meteor add acemtp:accounts-slack
meteor add dmihal:slack
```
2. Authenticate the user with Slack. Use `Meteor.loginWithSlack` or simply use the `loginButtons` template with the `accounts-ui` package.
3. Use methods like `Slack.channels()` and `Slack.users()` to access Slack information. Read the documentation below for more information.Documentation
-------------### Slack.channels([query])
Returns an array of Channel objects representing each public channel on the user's Slack team.**Arguments**
**`query`:** Channel ID or Mongo-style selector
### Slack.users([query])
Returns an array of User objects.**Arguments**
**`query`:** User ID or Mongo-style selector
### Channel
The Channel object contains all the properties of a [Slack Channel object](https://api.slack.com/types/channel).### Channel.members()
Returns an array of users that have joined the channel### Channel.postMessage(message, [options])
Posts a message to the channel from a bot.**Arguments**
**`message`:** *String* Message to post in the channel
**`options.username`:** *String* Username the message will appear from. Defaults to 'Slackbot'### User
The User object contains all the properties of a [Slack User object](https://api.slack.com/types/user).Licence
=======
Copyright (c) 2015 David Mihal.This projected is licensed under the terms of the MIT license.