Net-Stream
view release on metacpan or search on metacpan
--- #YAML:1.0
name: Net-Twitter-Stream
version: 0.28
abstract: Connect to the Twitter streaming api
author:
- Martin Redmond (@martinredmond)
license: unknown
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
build_requires:
ExtUtils::MakeMaker: 0
requires:
JSON: 2
Makefile.PL view on Meta::CPAN
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'Net::Twitter::Stream',
VERSION_FROM => 'Stream.pm',
AUTHOR => 'Martin Redmond (@martinredmond)',
ABSTRACT => 'Connect to the Twitter streaming api',
PREREQ_PM => {
'Test::Simple' => 0.44,
'JSON' => 2.0,
},
);
NAME
Using Twitter's streaming api.
SYNOPSIS
use Net::Twitter::Stream;
Net::Twitter::Stream->new ( user => $username, pass => $password,
callback => \&got_tweet,
track => 'perl,tinychat,emacs',
follow => '27712481,14252288,972651' );
sub got_tweet {
various subsets of Twitter public statuses.
The /1/status/filter.json api call can be use to track up to 200
keywords and to follow 200 users.
HTTP Basic authentication is supported (no OAuth yet) so you will need a
twitter account to connect.
JSON format is only supported. Twitter may depreciate XML.
More details at: http://dev.twitter.com/pages/streaming_api
Options user, pass: required, twitter account user/password callback:
required, a subroutine called on each received tweet
perl@redmond5.com @martinredmond
UPDATES
https fix: iwan standley <iwan@slebog.net>
use IO::Socket;
use MIME::Base64;
use JSON;
use IO::Socket::SSL;
our $VERSION = '0.28';
1;
=head1 NAME
Using Twitter's streaming api.
=head1 SYNOPSIS
use Net::Twitter::Stream;
Net::Twitter::Stream->new ( user => $username, pass => $password,
callback => \&got_tweet,
track => 'perl,tinychat,emacs',
follow => '27712481,14252288,972651' );
The /1/status/filter.json api call can be use to track up to 200 keywords
and to follow 200 users.
HTTP Basic authentication is supported (no OAuth yet) so you will need
a twitter account to connect.
JSON format is only supported. Twitter may depreciate XML.
More details at: http://dev.twitter.com/pages/streaming_api
Options
user, pass: required, twitter account user/password
callback: required, a subroutine called on each received tweet
perl@redmond5.com
@martinredmond
=head1 UPDATES
( run in 0.271 second using v1.01-cache-2.11-cpan-4d50c553e7e )