lib/index.js
function (options) {
  EventEmitter.call(this);

  var self = this;

  self.options = _.extend({
    user: '',
    password: '',
    userAgent: null,
    url: null,
    debug: false,
    parser: JSONBigInt
  }, options || {});

  self._req = null;

  self.parser = new JSONParser(self.options.parser);
  self.parser.on('object', function (object) {
    self.emit('object', object);
    if (object.error) self.emit('error', new Error('Stream response error: ' + (object.error.message || '-')));
    else if (object['delete']) self.emit('delete', object);
    else if (object.body || object.text) self.emit('tweet', object);
  });
  self.parser.on('error', function (err) {
    self.emit('error', err);
  });
}
function (options) {
  EventEmitter.call(this);

  var self = this;

  self.options = _.extend({
    user: '',
    password: '',
    userAgent: null,
    url: null,
    debug: false,
    parser: JSONBigInt
  }, options || {});

  self._req = null;

  self.parser = new JSONParser(self.options.parser);
  self.parser.on('object', function (object) {
    self.emit('object', object);
    if (object.error) self.emit('error', new Error('Stream response error: ' + (object.error.message || '-')));
    else if (object['delete']) self.emit('delete', object);
    else if (object.body || object.text) self.emit('tweet', object);
  });
  self.parser.on('error', function (err) {
    self.emit('error', err);
  });
}
function ( options ) { EventEmitter . call ( this ) ; var self = this ; self . options = _ . extend ( { user : '' , password : '' , userAgent : null , url : null , debug : false , parser : JSONBigInt } , options || { } ) ; self . _req = null ; self . parser = new JSONParser ( self . options . parser ) ; self . parser . on ( 'object' , function ( object ) { self . emit ( 'object' , object ) ; if ( object . error ) self . emit ( 'error' , new Error ( 'Stream response error: ' + ( object . error . message || '-' ) ) ) ; else if ( object [ 'delete' ] ) self . emit ( 'delete' , object ) ; else if ( object . body || object . text ) self . emit ( 'tweet' , object ) ; } ) ; self . parser . on ( 'error' , function ( err ) { self . emit ( 'error' , err ) ; } ) ; }
Connects to Gnip streaming api and tracks keywords.

@param options Object with the following properties:
- (String) user
- (String) password
- (String) userAgent
- (String) url
- (Boolean) debug

Events:
- data: function(String data) {...}
- object: function(Object object) {...}
- tweet: function(Object tweet) {...}
- delete: function(Number id) {...}
- error: function(Error error) {...}
- ready: function() {...}
- end: function() {...}
Connects to Gnip streaming api and tracks keywords .