NAME
WebService::Recruit::AbRoad::Hotel - AB-ROAD Web Service "hotel" API
SYNOPSIS
use WebService::Recruit::AbRoad;
my $service = WebService::Recruit::AbRoad->new();
my $param = {
'area' => 'EUR',
'key' => $ENV{'WEBSERVICE_RECRUIT_KEY'},
};
my $res = $service->hotel( %$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 "hotel: $data->hotel\n";
print "...\n";
DESCRIPTION
This module is a interface for the hotel
API. It accepts following query parameters to make an request.
my $param = {
'key' => 'XXXXXXXX',
'area' => 'EUR',
'country' => 'BE',
'city' => 'NYC',
'hotel' => '73393',
'keyword' => 'グランド',
'in_use' => 'XXXXXXXX',
'order' => 'XXXXXXXX',
'start' => 'XXXXXXXX',
'count' => 'XXXXXXXX',
};
my $res = $service->hotel( %$param );
$service
above is an instance of WebService::Recruit::AbRoad.
METHODS
root
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->hotel
$root->hotel->[0]->code
$root->hotel->[0]->name
$root->hotel->[0]->name_en
$root->hotel->[0]->tour_count
$root->hotel->[0]->city
$root->hotel->[0]->city->code
$root->hotel->[0]->city->name
$root->hotel->[0]->city->name_en
$root->hotel->[0]->city->area
$root->hotel->[0]->city->country
$root->hotel->[0]->city->area->code
$root->hotel->[0]->city->area->name
$root->hotel->[0]->city->country->code
$root->hotel->[0]->city->country->name
$root->hotel->[0]->city->country->name_en
xml
This returns the raw response context itself.
print $res->xml, "\n";
code
This returns the response status code.
my $code = $res->code; # usually "200" when succeeded
is_error
This returns true value when the response has an error.
die 'error!' if $res->is_error;
SEE ALSO
AUTHOR
RECRUIT Media Technology Labs <mtl@cpan.org>
COPYRIGHT
Copyright 2008 RECRUIT Media Technology Labs
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 92:
Non-ASCII character seen before =encoding in ''グランド','. Assuming CP1252