
WebService::Recruit::AbRoad::City - AB-ROAD Web Service "city" API

use WebService::Recruit::AbRoad;
my $service = WebService::Recruit::AbRoad->new();
my $param = {
'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'},
};
my $res = $service->city( %$param );
my $data = $res->root;
print "api_version: $data->api_version\n";
print "results_available: $data->results_available\n";
print "results_returned: $data->results_returned\n";
print "results_start: $data->results_start\n";
print "city: $data->city\n";
print "...\n";

This module is a interface for the city API. It accepts following query parameters to make an request.
my $param = {
'key' => 'XXXXXXXX',
'area' => 'EUR',
'country' => 'BE',
'city' => 'NYC',
'keyword' => 'ãããã ',
'in_use' => 'XXXXXXXX',
'order' => 'XXXXXXXX',
'start' => 'XXXXXXXX',
'count' => 'XXXXXXXX',
};
my $res = $service->city( %$param );
$service above is an instance of WebService::Recruit::AbRoad.

This returns the root element of the response.
my $root = $res->root;
You can retrieve each element by the following accessors.
$root->api_version
$root->results_available
$root->results_returned
$root->results_start
$root->city
$root->city->[0]->code
$root->city->[0]->name
$root->city->[0]->name_en
$root->city->[0]->tour_count
$root->city->[0]->lat
$root->city->[0]->lng
$root->city->[0]->area
$root->city->[0]->country
$root->city->[0]->area->code
$root->city->[0]->area->name
$root->city->[0]->country->code
$root->city->[0]->country->name
$root->city->[0]->country->name_en
This returns the raw response context itself.
print $res->xml, "\n";
This returns the response status code.
my $code = $res->code; # usually "200" when succeeded
This returns true value when the response has an error.
die 'error!' if $res->is_error;


RECRUIT Media Technology Labs <mtl@cpan.org>

Copyright 2008 RECRUIT Media Technology Labs