Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

@eyedea-sockets/slack

0.1.1 • Public • Published

Syncano Socket for Slack

Syncano Socket CircleCI branch Codecov branch JavaScript Style Guide npm license

Main Socket features:

  • slack/invite — handle invitations
  • slack/list — list all Slack users

Getting Started

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)

Endpoints

slack/list

Input:

No input parameters.

Outputs:

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.

slack/invite

Input:

Parameter Type Required Example
email string Yes john.snow@eyedea.io

Outputs:

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!

Install

npm i @eyedea-sockets/slack

DownloadsWeekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

3.5 MB

Total Files

14

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar