Main Socket features:
- slack/invite — handle invitations
- slack/list — list all Slack users
Install package in your project:
cd my_project
npm install @syncano/cli --save-dev
npm install @eyedea-sockets/slack --save
npx s deploy
Use it:
import Syncano from @syncano/client
const s = new Syncano(<instaneName>)
// Invitation
const params = {
email: 'john@doe.com',
token: 'xoxp-17802080787-17802080963-23787252214-e634269418'
}
const invitationStatus = await s.get('slack/invite', params)
// Listing users
const params = {
token: 'xoxp-17802080787-17802080963-23787252214-e634269418'
}
const usersList = await s.get('slack/list', params)
No input parameters.
success - Operation Successful
- Code: 200
- Mimetype: application/json
Parameter | Type | Description | Example |
---|---|---|---|
users | array | List of users | [{"id": "1234", "username": "mkucharz"}] |
fail - Operation failed
- Code: 400
- Mimetype: application/json
Parameter | Type | Description | Example |
---|---|---|---|
message | string | Invitation failed | Internal error. |
Parameter | Type | Required | Example |
---|---|---|---|
string | Yes | john.snow@eyedea.io |
success - Operation Successful
- Code: 200
- Mimetype: application/json
Parameter | Type | Description | Example |
---|---|---|---|
message | string | Invitation successful | User invited successfully! |
fail - Operation failed
- Code: 400
- Mimetype: application/json
Parameter | Type | Description | Example |
---|---|---|---|
message | string | Invitation failed | User already invited! |