NAME
WebService::Recruit::AbRoad::Tour - AB-ROAD Web Service "tour" API
SYNOPSIS
my
$service
= WebService::Recruit::AbRoad->new();
my
$param
= {
'area'
=>
'EUR'
,
'key'
=>
$ENV
{
'WEBSERVICE_RECRUIT_KEY'
},
};
my
$res
=
$service
->tour(
%$param
);
my
$data
=
$res
->root;
"api_version: $data->api_version\n"
;
"results_available: $data->results_available\n"
;
"results_returned: $data->results_returned\n"
;
"results_start: $data->results_start\n"
;
"tour: $data->tour\n"
;
"...\n"
;
DESCRIPTION
This module is a interface for the tour
API. It accepts following query parameters to make an request.
my
$param
= {
'key'
=>
'XXXXXXXX'
,
'id'
=>
'AB123456'
,
'area'
=>
'EUR'
,
'country'
=>
'BE'
,
'city'
=>
'NYC'
,
'hotel'
=>
'73393'
,
'keyword'
=>
'ベトナム 癒し'
,
'dept'
=>
'XXXXXXXX'
,
'ym'
=>
'0708'
,
'ymd'
=>
'070812'
,
'price_min'
=>
'30000'
,
'price_max'
=>
'100000'
,
'term_min'
=>
'3'
,
'term_max'
=>
'10'
,
'airline'
=>
'A0'
,
'kodaw'
=>
'XXXXXXXX'
,
'order'
=>
'XXXXXXXX'
,
'start'
=>
'XXXXXXXX'
,
'count'
=>
'XXXXXXXX'
,
};
my
$res
=
$service
->tour(
%$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
->tour
$root
->tour->[0]->id
$root
->tour->[0]->last_update
$root
->tour->[0]->term
$root
->tour->[0]->title
$root
->tour->[0]->airline
$root
->tour->[0]->airline_summary
$root
->tour->[0]->brand
$root
->tour->[0]->city_summary
$root
->tour->[0]->dept_city
$root
->tour->[0]->hotel
$root
->tour->[0]->hotel_summary
$root
->tour->[0]->kodawari
$root
->tour->[0]->price
$root
->tour->[0]->sche
$root
->tour->[0]->urls
$root
->tour->[0]->airline->[0]->code
$root
->tour->[0]->airline->[0]->name
$root
->tour->[0]->brand->code
$root
->tour->[0]->brand->name
$root
->tour->[0]->dept_city->name
$root
->tour->[0]->dept_city->code
$root
->tour->[0]->hotel->[0]->code
$root
->tour->[0]->hotel->[0]->name
$root
->tour->[0]->hotel->[0]->city
$root
->tour->[0]->kodawari->[0]->code
$root
->tour->[0]->kodawari->[0]->name
$root
->tour->[0]->price->all_month
$root
->tour->[0]->price->min
$root
->tour->[0]->price->max
$root
->tour->[0]->sche->[0]->day
$root
->tour->[0]->sche->[0]->city
$root
->tour->[0]->urls->mobile
$root
->tour->[0]->urls->pc
$root
->tour->[0]->urls->
qr
$root->tour->[0]->hotel->[0]->city->code
$root
->tour->[0]->hotel->[0]->city->name
$root
->tour->[0]->price->all_month->min
$root
->tour->[0]->price->all_month->max
$root
->tour->[0]->sche->[0]->city->code
$root
->tour->[0]->sche->[0]->city->name
$root
->tour->[0]->sche->[0]->city->lat
$root
->tour->[0]->sche->[0]->city->lng
$root
->tour->[0]->sche->[0]->city->area
$root
->tour->[0]->sche->[0]->city->country
$root
->tour->[0]->sche->[0]->city->area->code
$root
->tour->[0]->sche->[0]->city->area->name
$root
->tour->[0]->sche->[0]->city->country->code
$root
->tour->[0]->sche->[0]->city->country->name
xml
This returns the raw response context itself.
$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 102:
Non-ASCII character seen before =encoding in ''ベトナム 癒し','. Assuming UTF-8