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

NAME

WWW::GoKGS::Scraper::TournList - List of KGS tournaments

SYNOPSIS

  use WWW::GoKGS::Scraper::TournList;

  my $tourn_list = WWW::GoKGS::Scraper::TournList->new;

  my $result = $tourn_list->query(
      year => 2012
  );
  # => {
  #     tournaments => [
  #         ...
  #         {
  #             name => 'KGS Meijin Qualifier October 2012',
  #             notes => 'Winner: foo',
  #             uri  => '/tournInfo.jsp?id=762'
  #         },
  #         ...
  #     ],
  #     year_index => [
  #         {
  #             year => 2001,
  #             uri  => '/tournList.jsp?year=2001'
  #         },
  #         ...
  #     ]
  # }

DESCRIPTION

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

INSTANCE METHODS

$uri = $class->base_uri
  # => "http://www.gokgs.com/tournList.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.

METHODS

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

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.