FilteredStream

Feb 3, 2014 at 2:49 AM
when i'm using tweetinvi 0.8.3.23 this line still work.
IFilteredStream stream = new FilteredStream();
what is declaration of filteredStream on 0.9??
Coordinator
Feb 3, 2014 at 11:27 AM
Edited Feb 3, 2014 at 11:28 AM
When i'm using tweetinvi 0.8.3.23 this line still work.

There is no change to the version 0.8.3.23 and no design changes will be performed to the 0.8.x versions.

What is declaration of filteredStream on 0.9??
var filteredStream = Stream.CreateFilteredStream();
You can then use the object like before but to simplify the development, the new tweets received will be sent through an event.
// Add a Track
stream.AddTrack("tweetinvi");

// Event to be raised when a tweet is received
stream.MatchingTweetReceived += (sender, args) => { Console.WriteLine(args.Tweet.Text); };

stream.MatchingTweetAndLocationReceived += (sender, args) => { Console.WriteLine(args.Tweet.Text); };

// Start a stream matching either the track, location or follower conditions
stream.StartStreamMatchingAnyCondition();

// Start the stream matching both the track, location and follower conditions
stream.StartStreamMatchingAllConditions();
Hope this answers your question.
Regards,
Linvi
Marked as answer by linvi on 2/4/2014 at 4:08 AM
Feb 6, 2014 at 8:50 AM
thanks for your help linvi. :)