The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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.

CLASS METHODS

$uri = $class->base_uri
  # => "http://www.gokgs.com/top100.jsp"
$URI = $class->build_uri
  # => URI->new( "http://www.gokgs.com/top100.jsp" )

INSTANCE METHODS

$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).

$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.