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

NAME

WWW::GoKGS::Scraper::TournInfo - Information for the KGS tournament

SYNOPSIS

  use WWW::GoKGS::Scraper::TournInfo;

  my $tourn_info = WWW::GoKGS::Scraper::TournInfo->new;

  my $result = $tourn_info->query(
      id => 762
  );
  # => {
  #     name => 'KGS Meijin Qualifier October 2012',
  #     notes => 'Winner: foo',
  #     description => 'Welcome to the KGS Meijin October Qualifier! ...',
  #     links => {
  #         entrants => [
  #             {
  #                 sort_by => 'name',
  #                 uri     => '/tournEntrants.jsp?id=762&sort=n'
  #             },
  #             {
  #                 sort_by => 'result',
  #                 uri     => '/tournEntrants.jsp?id=762&sort=s'
  #             }
  #         ],
  #         rounds => [
  #             {
  #                 round      => 1,
  #                 start_time => '2012-10-27T16:05',
  #                 end_time   => '2012-10-27T18:35',
  #                 uri        => '/tournGames.jsp?id=762&round=1'
  #             },
  #             ...
  #         ]
  #     }
  # }

DESCRIPTION

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

CLASS METHODS

$uri = $class->base_uri
  # => "http://www.gokgs.com/tournInfo.jsp"
$URI = $class->build_uri( $k1 => $v1, $k2 => $v2, ... )
$URI = $class->build_uri({ $k1 => $v1, $k2 => $v2, ... })
$URI = $class->build_uri([ $k1 => $v1, $k2 => $v2, ... ])

Given key-value pairs of query parameters, constructs a URI object which consists of base_uri and the paramters.

INSTANCE METHODS

$UserAgent = $tourn_info->user_agent
$tourn_info->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 = $tourn_info->scrape( URI->new(...) )
$HashRef = $tourn_info->scrape( HTTP::Response->new(...) )
$HashRef = $tourn_info->scrape( $html[, $base_uri] )
$HashRef = $tourn_info->scrape( \$html[, $base_uri] )
$HashRef = $tourn_info->query( id => $tourn_id )

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.