nylas-stream
v0.0.1
Published
Streaming Wrapper for Nylas API
Downloads
7
Maintainers
Readme
Nylas-Stream
A simple wrapper around the Nylas Delta API. Uses Node’s EventEmitter API to expose the different messages the delta endpoint spits out. Uses some of the concepts in Emittable and Node-Tweet-Stream behind the scenes to make the wrapper seamless without relying on Promises or Callbacks.
Installation
---------------
git clone https://github.com/trever/nylas-stream
cd nylas-stream
npm install
node test.js
--------------
npm install nylas-stream
var nylas_stream = require('nylas-stream');
var user = nylas_stream().user( < ACCESS_TOKEN > [, < NAMESPACE > ]);
var sub = user.subscribe([ < CURSOR >]);
sub.events({
'create_message':function(message){
console.log('Message: ', message);
}
});Usage
See above! More to come.
