Net::Topsy - Perl Interface to the Otter API to Topsy.com
Version 0.03
use Net::Topsy; my $topsy = Net::Topsy->new( { key => $beta_key } ); my $search1 = $topsy->search( { q => 'perl' } ); my $search2 = $topsy->search( { q => 'lolcats', page => 3, perpage => 20 } );
All API methods take a hash reference of CGI parameters. These will be URI-escaped, so that does not have to be done before calling these methods.
Expect this API to change when Topsy is out of beta. Unknown parameters are currently ignored by Topsy, but that could change at any time.
my $search = $topsy->search( { q => 'perl', window => 'd' } );
Takes mandatory parameter "q", a string to search for, and the optional parameter "window", which defaults to "a". Valid options for the "window" parameter are: "auto" lets Topsy to pick the best window, "h" last hour, "d" last day, "w" last week, "m" last month, "a" all time.
my $trends = $topsy->trending( { perpage => 5 } );
This method takes optional "perpage" argument and returns a Net::Topsy::Result object.
Jonathan Leto, <jonathan at leto.net>
<jonathan at leto.net>
Please report any bugs or feature requests to bug-net-topsy at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net::Topsy. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-net-topsy at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Net::Topsy
For documentation about the Otter API to Topsy.com : http://code.google.com/p/otterapi .
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net::Topsy
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Net::Topsy
CPAN Ratings
http://cpanratings.perl.org/d/Net::Topsy
Search CPAN
http://search.cpan.org/dist/Net::Topsy
Many thanks to Marc Mims <marc@questright.com>, the author of Net::Twitter, for the Mock::LWP::UserAgent module that mocks out LWP::UserAgent for the tests. Thanks to Richard Soderberg <rs@topsy.com> for various bugfixes.
Copyright 2009 Jonathan Leto <jonathan@leto.net>, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Net::Topsy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Topsy
CPAN shell
perl -MCPAN -e shell install Net::Topsy
For more information on module installation, please visit the detailed CPAN module installation guide.