| 1 | package WebService::Rakuten::API::Provider::Travel; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | |||
| 5 | use constant BASEHOTELURL => 'https://app.rakuten.co.jp/services/api/Travel/SimpleHotelSearch/20131024?'; | ||
| 6 | |||
| 7 | use constant HOTELNOURL => 'https://app.rakuten.co.jp/services/api/Travel/HotelDetailSearch/20131024?'; | ||
| 8 | |||
| 9 | use constant VACANTURL => 'https://app.rakuten.co.jp/services/api/Travel/VacantHotelSearch/20131024?'; | ||
| 10 | |||
| 11 | use constant GETAREAURL => 'https://app.rakuten.co.jp/services/api/Travel/GetAreaClass/20131024?'; | ||
| 12 | |||
| 13 | use constant GERHOTELCHAINURL => 'https://app.rakuten.co.jp/services/api/Travel/GetHotelChainList/20131024?'; | ||
| 14 | |||
| 15 | use constant RANKINGURL => 'https://app.rakuten.co.jp/services/api/Travel/HotelRanking/20131024?'; | ||
| 16 | |||
| 17 | sub call{ | ||
| 18 | my ($class,$context,$arg) = @_; | ||
| 19 | my $url = URI->new(BASEHOTELURL); | ||
| 20 | $url->query_form(applicationId=> $context->appid,format=>'json',largeClassCode => $arg->{largeClassCode},middleClassCode=>$arg->{middleClassCode},smallClassCode=>$arg->{smallClassCode}); | ||
| 21 | my $res =$context->furl->get($url); | ||
| 22 | return $res; | ||
| 23 | } | ||
| 24 | |||
| 25 | |||
| 26 | 1; |