Browse files

added reconnection example

  • Loading branch information...
1 parent e82eab8 commit 77a5cd393d028eb5931ea7121fd7d90db991b6a5 @impronunciable committed Nov 26, 2012
Showing with 18 additions and 0 deletions.
  1. +6 −0 examples/reconnect/keys.json.sample
  2. +12 −0 examples/reconnect/reconnect.js
View
6 examples/reconnect/keys.json.sample
@@ -0,0 +1,6 @@
+{
+ "consumer_key" : ""
+ , "consumer_secret" : ""
+ , "access_token_key" : ""
+ , "access_token_secret" : ""
+}
View
12 examples/reconnect/reconnect.js
@@ -0,0 +1,12 @@
+
+var tuiter = require('tuiter')(require('./keys.json'));
+
+var stream;
+
+tuiter.filter({track: ['goal', 'free kick']}, function(res) {
+ stream = res;
+
+ res.on('tweet', function(tweet.text){console.log(tweet.text);})
+});
+
+setTimeout(stream.emit.bind(stream, {track: 'messi'}), 10000);

0 comments on commit 77a5cd3

Please sign in to comment.