WWW::Opentracker::Stats - Perl module for retrieve statistics from Opentracker
use WWW::Opentracker::Stats; my $ot_stats = WWW::Opentracker::Stats->new({ 'statsurl' => 'http://localhost:6969/stats', }); my $stats_ref = $ot_stats->stats(qw/tpbs peer/); my $tpbs_stats = $stats_ref->{'tpbs'}; print "Downloads:\n"; while (my ($torrent, $tstats) = each %{ $tpbs_stats->{'files'} }) { print "$torrent: " . $tstats->{'downloaded'} . "\n"; }
Provides an easy to use interface to retrieve various statistics from "opentracker", a BitTorrent tracker.
It executes HTTP requests to opentrackers web services, parses the response and returns data structures that you can easily extract data from, to store it in a database or display it on the web.
Args: $class, $args
Constructor. Creates a new instance of the class.
It takes a HASH/HASHREF of arguments. - statsurl (mandatory) - useragent (optional)
Args: $self
Creates a default user agent that can be used to fetch statistics from opentracker. See "default" in WWW::Opentracker::Stats::UserAgent for details.
Returns a HASHREF with properties that can be passed on to the constructor of the statistics mode packages.
Returns all the available modes as an array.
WWW::Opentracker::Stats::Mode
Opentracker: http://erdgeist.org/arts/software/opentracker/.
Knut-Olav Hoven, <knutolav@gmail.com>
Copyright (C) 2009 by Knut-Olav Hoven
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install WWW::Opentracker::Stats, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Opentracker::Stats
CPAN shell
perl -MCPAN -e shell install WWW::Opentracker::Stats
For more information on module installation, please visit the detailed CPAN module installation guide.