#!/usr/bin/perlAmazon API をごにょごにょできるPerlモジュール。
use strict;
use warnings;
use Net::Amazon;
use Cache::File;
use Encode;
binmode STDOUT, ":utf8";
my $cache = Cache::File->new(cache_root => '/var/tmp/cache-amazon',
lock_level => Cache::File::LOCK_LOCAL(),
default_expires => '24 hours');
my $ua = Net::Amazon->new(token => 'YOUR_TOKEN',
locale => 'jp',
cache => $cache,
max_pages => 1,
);
#my $response = $ua->search(asin => '4873110505');
#my $response = $ua->search(blended => "Perl");
my $response = $ua->search(keyword => "Perl", mode => "books-jp");
#my $response = $ua->search(keyword => "Perl", mode => "books");
if (not $response->is_success()) {
print "Error: ", $response->message(), "\n";
exit;
}
print $response->as_string(), "\n";
for ($response->properties()) {
print "Asin()\t", $_->Asin(), "\n";
print "ProductName()\t", $_->ProductName(), "\n";
%2
2007年09月12日(水) 10:51
[を] Net::Amazon のメモ/MSM
エントリーナビ
「[を] Net::Amazon のメモ/MSM」は Perl カテゴリーの記事です。
次のエントリー:IBM Perlモジュールの展開を自動化する - Japan/MSM
前のエントリー:あなたの作ったメール配信システムはエラーメール処理をしていますか? :: Drk7jp/MSM
次のエントリー:IBM Perlモジュールの展開を自動化する - Japan/MSM

前のエントリー:あなたの作ったメール配信システムはエラーメール処理をしていますか? :: Drk7jp/MSM