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

NAME

WebService::Recruit::Jalan::AreaSearch - Jalan Web Service "AreaSearch" API

SYNOPSIS

    use WebService::Recruit::Jalan;

    my $jalan = WebService::Recruit::Jalan->new();
    $jalan->key( 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' );

    my $param = {
        reg     =>  '15',
    };
    my $res = $jalan->AreaSearch( %$param );
    die "error!" if $res->is_error;

    my $list = $res->root->Area->Region;
    foreach my $reg ( @$list ) {
        print $reg->cd, "\t# ",  $reg->name, "\n";
        foreach my $pref ( @{ $reg->Prefecture } ) {
            print $pref->cd, "\t  * ",  $pref->name, "\n";
            foreach my $large ( @{ $pref->LargeArea } ) {
                print $large->cd, "\t    + ",  $large->name, "\n";
                foreach my $small ( @{ $large->SmallArea } ) {
                    print $small->cd, "\t      - ",  $small->name, "\n";
                }
            }
        }
    }

    my $root = $res->root;

DESCRIPTION

The request to this API requires one or some of query parameters below:

    my $param = {
        reg         =>  '10'
        pref        =>  '130000'
        l_area      =>  '136200'
    };

The response from this API is tree structured and provides methods below:

    $root->APIVersion
    $root->Area
    $root->Area->Region
    $root->Area->Region->[0]->cd
    $root->Area->Region->[0]->name
    $root->Area->Region->[0]->Prefecture
    $root->Area->Region->[0]->Prefecture->[0]->cd
    $root->Area->Region->[0]->Prefecture->[0]->name
    $root->Area->Region->[0]->Prefecture->[0]->LargeArea
    $root->Area->Region->[0]->Prefecture->[0]->LargeArea->[0]->cd
    $root->Area->Region->[0]->Prefecture->[0]->LargeArea->[0]->name
    $root->Area->Region->[0]->Prefecture->[0]->LargeArea->[0]->SmallArea
    $root->Area->Region->[0]->Prefecture->[0]->LargeArea->[0]->SmallArea->[0]->cd
    $root->Area->Region->[0]->Prefecture->[0]->LargeArea->[0]->SmallArea->[0]->name

And paging methods are provided, see "PAGING" in WebService::Recruit::Jalan. This module is based on XML::OverHTTP.

SEE ALSO

WebService::Recruit::Jalan

AUTHOR

Yusuke Kawasaki http://www.kawa.net/

This module is unofficial and released by the authour in person.

COPYRIGHT AND LICENSE

Copyright (c) 2007 Yusuke Kawasaki. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.