NAME

WWW::GoKGS::Scraper::Top100 - Top 100 KGS Players

SYNOPSIS

use WWW::GoKGS::Scraper::Top100;
my $top_100 = WWW::GoKGS::Scraper::Top100->new;
my $result = $top_100->query;

DESCRIPTION

This class inherits from WWW::GoKGS::Scraper.

ATTRIBUTES

$URI = $top_100->base_uri

Defaults to http://www.gokgs.com/top100.jsp. This attribute is read-only.

$UserAgent = $top_100->user_agent
$top_100->user_agent( LWP::UserAgent->new(...) )

Can be used to get or set an LWP::UserAgent object which is used to GET the requested resource. Defaults to the LWP::UserAgent object shared by Web::Scraper users ($Web::Scraper::UserAgent).

METHODS

$HashRef = $top_100->query

Returns a hash reference which contains the top 100 KGS players. The hashref is formatted as follows:

{
    players => [
        {
            position => 1,
            name     => 'foo',
            rank     => '9d',
            uri      => '/graphPage.jsp?user=foo'
        },
        {
            position => 2,
            name     => 'bar',
            rank     => '9d',
            uri      => '/graphPage.jsp?user=bar'
        },
        ...
        {
            position => 100,
            name     => 'baz',
            rank     => '6d',
            uri      => '/graphPage.jsp?user=baz'
        }
    ]
}
$HashRef = $top_100->scrape( URI->new(...) )
$HashRef = $top_100->scrape( HTTP::Response->new(...) )
$HashRef = $top_100->scrape( $html[, $base_uri] )
$HashRef = $top_100->scrape( \$html[, $base_uri] )

SEE ALSO

WWW::GoKGS

AUTHOR

Ryo Anazawa (anazawa@cpan.org)

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.