hipchat-stream

stream interface for HipChat API, specialized for message posting

Usage no npm install needed!

<script type="module">
  import hipchatStream from 'https://cdn.skypack.dev/hipchat-stream';
</script>

README

hipchat-stream

stream interface for HipChat API, specialized for message posting

Installation

$ npm install hipchat-stream

Usage

As far we support only /rooms/message.

hipchat() returns a tramsform stream (based on Stream1) which accepts a flow of string to be post, and outputs a flow of string API response.

var hipchat = require('hipchat-stream');
var from = require('from');

var stream = hipchat('your auth token', 'room ID', 'from', {
  // other optional parameters (e.g. color, notify)
}

var readable = from(['this', 'is', 'a', 'readable', 'stream']);

from.pipe(hipchat).pipe(process.stdout) // {"status":"sent"}{"status:"sent"} ...

License

MIT