| 1 | package WebService::Rakuten::API::Provider::Ichiba; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | |||
| 5 | use constant BASEICHIBAURL => 'https://app.rakuten.co.jp/services/api/IchibaItem/Search/20140222?'; | ||
| 6 | |||
| 7 | use constant BASEICHIBAGENRE => 'https://app.rakuten.co.jp/services/api/IchibaGenre/Search/20140222?'; | ||
| 8 | |||
| 9 | use constant BASETAGURL => 'https://app.rakuten.co.jp/services/api/IchibaTag/Search/20140222?'; | ||
| 10 | |||
| 11 | use constant BASERANKURL => 'https://app.rakuten.co.jp/services/api/IchibaItem/Ranking/20120927?'; | ||
| 12 | |||
| 13 | sub call{ | ||
| 14 | my($class,$context,$arg) = @_; | ||
| 15 | my $url = URI->new(BASEICHIBAURL); | ||
| 16 | $url->query_form(applicationId => $context->appid,format=>$arg->{format},keyword =>$arg->{keyword}); | ||
| 17 | my $res = $context->furl->get($url); | ||
| 18 | my $response = JSON::decode_json($res->decoded_content); | ||
| 19 | } | ||
| 20 | |||
| 21 | 1; |