node wrapper for http://hooks.events
GET your copy of hooks.events on the site
npm install node-hooks-events -save
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
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
}
hooks <apiKey>,<apiKey>,<apiKey>,... <title> <message>