IWAI Masaharu
iwai****@users*****
2007年 1月 24日 (水) 04:22:06 JST
Index: docs/modules/WebService-Rakuten-0.02/lib/WebService/Rakuten.pod diff -u /dev/null docs/modules/WebService-Rakuten-0.02/lib/WebService/Rakuten.pod:1.1 --- /dev/null Wed Jan 24 04:22:06 2007 +++ docs/modules/WebService-Rakuten-0.02/lib/WebService/Rakuten.pod Wed Jan 24 04:22:06 2007 @@ -0,0 +1,126 @@ +=head1 NAME + +WebService::Rakuten - A Perl interface to the Rakuten WebService API + +=head1 SYNOPSIS + + use WebService::Rakuten; + + my $api = WebService::Rakuten->new( + dev_id => 'YOUR DEVELOPER ID', + aff_id => 'YOUR AFFILIATE ID', + ); + + # Item Search + my $rs = $api->item_search( + 'Wii', + { + shopCode => 'xyz', + hits => 30, + page => 1, + sort => '-itemPrice', + } + ); + + if ($res->status eq 'Success') { + for (@{ $rs->items }) { + print $_->itemName; + print $_->itemCode; + print $_->itemPrice; + print $_->itemCaption; + print $_->itemUrl; + print $_->affiliateUrl; + print $_->smallImageUrl; + print $_->mediumImageUrl; + print $_->availability; + print $_->taxFlag; + print $_->postageFlag; + print $_->creditCardFlag; + print $_->shopOfTheYearFlag; + print $_->affiliateRate; + print $_->startTime; + print $_->endTime; + print $_->reviewCount; + print $_->reviewAverage; + print $_->shopName; + print $_->shopCode; + print $_->shopUrl; + print $_->genreId; + } + } + + # Genre Search + $rs = $api->genre_search( + 0, + { genrePath => 0 } + ); + + if ($res->status eq 'Success') { + for (@{ $rs->childs }) { + print $_->genreId; + print $_->genreName; + print $_->genreLavel; + } + } + +=head1 DESCRIPTION + +WebService::Rakuten is a simple Perl interface to the Rakuten +WebService API. + +Rakuten Ichiba is the biggest online shopping mall in Japan. +For details, see http://www.rakuten.co.jp/. + +=head1 FUNCTIONS + +=head2 new(dev_id => 'Developer ID', aff_id => 'Affiliate ID') + +Returns an instance of this module. You must create an instace +before searching. + +Developer ID required. If you have Affiliate ID, you can set +affiliate link to products. + + +=cut + +=head2 item_search($keyword, \%options) + +Returns search results. Results is a +WebService::Rakuten::ItemResult object. It's contains status, +pager and WebService::Rakuten::Item objects. + + +=cut + +=head2 genre_search($genre_id, \%options) + +Returns genre search results. It's contains status and genre +objects (parent/current/child). + + +=cut + +=head1 SEE ALSO + +=over + +=item * http://webservice.rakuten.co.jp/ + +=back + +=head1 AUTHOR + +Hideaki Tanaka E<lt>tanak****@gmail*****<gt> + +=head1 COPYRIGHT + +This program is free software; you can redistribute +it and/or modify it under the same terms as Perl itself. + +The full text of the license can be found in the +LICENSE file included with this module. + + +=cut +