{"_id":"hipchat-notifier","_rev":"245678","name":"hipchat-notifier","description":"Send room notifications to the HipChat v2 API","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"briceburg","email":"briceburg@gmail.com"}],"time":{"modified":"2021-06-03T16:03:19.000Z","created":"2016-04-19T21:27:27.564Z","1.1.0":"2016-04-25T18:34:13.338Z","1.0.0":"2016-04-19T21:27:27.564Z"},"users":{},"author":{"name":"Brice Burgess @iceburgBrice"},"versions":{"1.1.0":{"name":"hipchat-notifier","version":"1.1.0","description":"Send room notifications to the HipChat v2 API","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Brice Burgess @iceburgBrice"},"license":"MIT","dependencies":{"lodash":"^4.0.0","request":"^2.0.0"},"gitHead":"30b10e185f782f4cad2c2d832b939f4333ebaa88","_id":"hipchat-notifier@1.1.0","_shasum":"b6d249755437c191082367799d3ba9a0f23b231e","_from":".","_npmVersion":"3.8.2","_nodeVersion":"5.9.0","_npmUser":{"name":"briceburg","email":"briceburg@gmail.com"},"dist":{"shasum":"b6d249755437c191082367799d3ba9a0f23b231e","size":103656,"noattachment":false,"key":"/hipchat-notifier/-/hipchat-notifier-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hipchat-notifier/download/hipchat-notifier-1.1.0.tgz"},"maintainers":[{"name":"briceburg","email":"briceburg@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hipchat-notifier-1.1.0.tgz_1461609250405_0.8055908910464495"},"directories":{},"publish_time":1461609253338,"_cnpm_publish_time":1461609253338,"_hasShrinkwrap":false},"1.0.0":{"name":"hipchat-notifier","version":"1.0.0","description":"Send room notifications to the HipChat v2 API","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":{"name":"Brice Burgess @iceburgBrice"},"license":"MIT","dependencies":{"lodash":"^4.0.0","request":"^2.0.0"},"gitHead":"cdf8cd3dcadc3d7e92b5d31a61a927e630b8600d","_id":"hipchat-notifier@1.0.0","_shasum":"3f717aeac51f9d1eda3b1101de5ffc944ea9d574","_from":".","_npmVersion":"3.8.2","_nodeVersion":"5.9.0","_npmUser":{"name":"briceburg","email":"briceburg@gmail.com"},"dist":{"shasum":"3f717aeac51f9d1eda3b1101de5ffc944ea9d574","size":1905,"noattachment":false,"key":"/hipchat-notifier/-/hipchat-notifier-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/hipchat-notifier/download/hipchat-notifier-1.0.0.tgz"},"maintainers":[{"name":"briceburg","email":"briceburg@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/hipchat-notifier-1.0.0.tgz_1461101246139_0.49813865893520415"},"directories":{},"publish_time":1461101247564,"_cnpm_publish_time":1461101247564,"_hasShrinkwrap":false}},"readme":"hipchat-notification\n====================\n\nSend [room notifications](https://www.hipchat.com/docs/apiv2/method/send_room_notification)\nto the [HipChat](https://www.hipchat.com/) v2 API using a [Bearer Token](https://www.hipchat.com/docs/apiv2/auth).\n\n![example output](\n  https://raw.githubusercontent.com/briceburg/hipchat-notifier/master/example/screenshot.png)\n\n\n## Installation\n\n```js\n$ npm install --save hipchat-notification\n```\n\n\n## Usage\n\nTBD, from example.js\n\n```js\n\nvar room=\"devops\";\nvar token=\"token_with_notification_privs\";\n\n// instantiate a hipchat-notifier\nvar hipchat = require('hipchat-notifier').make(room, token);\n\n// the pyramid of doom example, calls to hipchat are serial\nhipchat.notice('this is a .notice()', function(err, response, body){\n  hipchat.info('this is a .info()', function(err, response, body){\n    hipchat.success('this is a .success()', function(err, response, body){\n      hipchat.warning('this is a .warning()', function(err, response, body){\n        hipchat.failure('this is a .failure()', function(err, response, body){\n\n\n          // getters and setters are supported\n          hipchat.setFrom('setter label');\n          hipchat.setNotify(true);\n\n          hipchat.setRoom(room);\n          hipchat.setToken(token);\n          hipchat.setHost('api.hipchat.com');\n\n          // bombs away\n          hipchat.notice('from setter label');\n\n          // support passing an explicit API object, falls back to defaults.\n          // allows sending HipChat cards &c. see:\n          //    https://www.hipchat.com/docs/apiv2/method/send_room_notification\n\n          var body = {\n            from: 'random color label',\n            message: '<p><em>this message</em> is a random color',\n            color: 'random'\n          };\n\n          // bombs away deux!\n          // callbacks are supported as 2nd argument\n          hipchat.send(body, function(err, res, body){\n            if(err) {\n              throw new Error(err);\n            }\n            console.log('finished');\n          });\n        });\n      });\n    });\n  });\n});\n\n```\n","_attachments":{},"license":"MIT"}