generic notifications/webhook client lib. Meant for use with slack/hipchat or generic webhooks
simple little module that sends a JSON payload to an arbitary endpoint or more
hipchat notification APIs. The main purpose of
this is to be a singular dispatcher with an expected format that works
seamlessly with all of these services. Options will be smartly intuited in the
//// Example with slack//var notify = require'notifi';var options =token: 'p19845osdfgsd0998'domain: 'myCompany';var note = notifyoptions;var payload =channel: '#general'text: 'Here is my message!'username: 'notifier';noteon'error'console.errorerr;;noteon'done'console.log'finished';;notedispatchpayload;
This shows the event emitter interface, you can also pass the
a callback as the second argument and handle the error/response that way.