npm

Need private packages and team management tools?Check out npm Orgs. »

node-hooks-events

0.0.31 • Public • Published

node-hooks

npm version Build Status

NPM

node wrapper for http://hooks.events

GET your copy of hooks.events on the site

INSTALL

npm install node-hooks-events -save

USAGE

var Hooks = require('node-hooks-events');

var hooks = new Hooks(appKey); //fill with given appkey from the app

// or if is an array of Api Keys
var hooks = new Hooks([
  appKey_1,
  appKey_2,
  ...
]);

send a message

hooks.send('title', 'message', callback(err,response));

that's it

Responses

If there is an error:

  err: <message>,
  {
    hooksTitle: '<title>',
    hooksMessage: '<message>',
    hookID: '<uuid of the hook request>',
    hooksApi: '<ref to appKey>',
    sent: false
  }

If request is ok:

  err:null,
  {
    hooksTitle: '<title>',
    hooksMessage: '<message>',
    hookID: '<uuid of the hook request>',
    hooksApi: '<ref to appKey>',
    sent: true
  }

BIN command:

hooks <apiKey>,<apiKey>,<apiKey>,... <title> <message>

install

npm i node-hooks-events

Downloadsweekly downloads

4

version

0.0.31

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability