AnyEvent::Twitter::Stream - Receive Twitter streaming API in an event loop
use AnyEvent::Twitter::Stream; # receive updates from @following_ids my $listener = AnyEvent::Twitter::Stream->new( username => $user, password => $password, method => "follow", follow => join(",", @following_ids), on_tweet => sub { my $tweet = shift; warn "$tweet->{user}{screen_name}: $tweet->{text}\n"; }, ); # track keywords my $guard = AnyEvent::Twitter::Stream->new( username => $user, password => $password, method => "track", keyword => "Perl,Test,Music", on_tweet => sub { }, );
AnyEvent::Twitter::Stream is an AnyEvent user to receive Twitter streaming API, available at http://apiwiki.twitter.com/Streaming-API-Documentation
See "track.pl" in eg for more client code example.
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AnyEvent::Twitter, Net::Twitter::Stream
To install AnyEvent::Twitter::Stream, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::Twitter::Stream
CPAN shell
perl -MCPAN -e shell install AnyEvent::Twitter::Stream
For more information on module installation, please visit the detailed CPAN module installation guide.