NAME
WebService::Recruit::HotPepper - perl interface for HotPepper Web Service
SYNOPSIS
use WebService::Recruit::HotPepper;
my $api = WebService::Recruit::HotPepper->new();
$api->key( 'xxxxxxxxxxxxxxxx' );
my $param = {
ServiceAreaCD => 'SA11',
GenreCD => 'G002',
};
my $res = $api->GourmetSearch( %$param );
my $list = $res->root->Shop;
foreach my $shop ( @$list ) {
print "name: ", $shop->ShopName, "\n";
print "addr: ", $shop->ShopAddress, "\n";
print "photo: ", $shop->PictureUrl->PcLargeImg, "\n";
print "\n";
}
DESCRIPTION
This module is a perl interface for the HotPepper Web Service (http://api.hotpepper.jp), provided by Recruit Co., Ltd., Japan. It provides API methods: "GourmetSearch", "ShopSearch", "LargeServiceArea", "ServiceArea", "LargeArea", "MiddleArea", "SmallArea", "Genre", "Food", and "Budget". With these methods, you can find restaurants and their discount coupons in Japan.
METHODS
new
This is the constructor method for this class.
my $api = WebService::Recruit::HotPepper->new();
This accepts optional parameters.
my $conf = { key => 'your_auth_key', utf8_flag => 1 };
my $api = WebService::Recruit::HotPepper->new( %$conf );
key
A valid developer key is required to make a request.
$api->key( 'your_auth_key' );
GourmetSearch
This makes a request for GourmetSearch
API. See WebService::Recruit::HotPepper::GourmetSearch for details.
my $res = $api->GourmetSearch( ServiceAreaCD=>'SA11' );
ShopSearch
This makes a request for ShopSearch
API. See WebService::Recruit::HotPepper::ShopSearch for details.
my $res = $api->ShopSearch( Keyword=>'pizza' );
LargeServiceArea
This makes a request for LargeServiceArea
API. See WebService::Recruit::HotPepper::LargeServiceArea for details.
my $res = $api->LargeServiceArea();
ServiceArea
This makes a request for ServiceArea
API. See WebService::Recruit::HotPepper::ServiceArea for details.
my $res = $api->ServiceArea();
LargeArea
This makes a request for LargeArea
API. See WebService::Recruit::HotPepper::LargeArea for details.
my $res = $api->LargeArea();
MiddleArea
This makes a request for MiddleArea
API. See WebService::Recruit::HotPepper::MiddleArea for details.
my $res = $api->MiddleArea();
SmallArea
This makes a request for SmallArea
API. See WebService::Recruit::HotPepper::SmallArea for details.
my $res = $api->SmallArea();
Genre
This makes a request for Genre
API. See WebService::Recruit::HotPepper::Genre for details.
my $res = $api->Genre();
Food
This makes a request for Food
API. See WebService::Recruit::HotPepper::Food for details.
my $res = $api->Food();
Budget
This makes a request for Budget
API. See WebService::Recruit::HotPepper::Budget for details.
my $res = $api->Budget();
utf8_flag / user_agent / lwp_useragent / http_lite
This modules uses XML::TreePP module internally. The following methods are available to configure it.
$api->utf8_flag( 1 );
$api->user_agent( 'Foo-Bar/1.0 ' );
$api->lwp_useragent( LWP::UserAgent->new() );
$api->http_lite( HTTP::Lite->new() );
SEE ALSO
http://api.hotpepper.jp/
AUTHOR
Toshimasa Ishibashi http://iandeth.dyndns.org/
This module is unofficial and released by the author in person.
THANKS TO
Yusuke Kawasaki http://www.kawa.net/
For creating/preparing all the base modules and stuff.
COPYRIGHT AND LICENSE
Copyright (c) 2007 Toshimasa Ishibashi. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.