peristream

0.1.7 • Public • Published

Peristream

A wrapper around periscope.tv event streams, allowing you to easilly access them.

Usage

npm i -S peristream
 
var peristream = require('peristream');
 
var stream = peristream(urlOrId);
 
stream.connect().then(function(emitter){
  emitter.on(peristream.ALL, function(message){
    // ...
  });
 
  emitter.on(peristream.HEARTS, function(message){
    // ...
  });
 
  emitter.on(peristream.COMMENTS, function(message){
    // ...
  });
 
  emitter.on(peristream.DISCONNECT, function(message){
    // ...
  });
 
});
 
// eventually...
stream.disconnect();

Example

Example browser usage at periscope-examples.

For a node example, simply:

npm start

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.7
    1
    • latest

Version History

Package Sidebar

Install

npm i peristream

Weekly Downloads

10

Version

0.1.7

License

MIT

Last publish

Collaborators

  • arnaudrinquin