URI::Amazon::APA - URI to access Amazon Product Advertising API
$Id: APA.pm,v 0.2 2009/05/22 19:31:05 dankogai Exp dankogai $
# self-explanatory use strict; use warnings; use URI::Amazon::APA; use LWP::UserAgent; use XML::Simple; use YAML::Syck; use URI::Amazon::APA; # instead of URI my $u = URI::Amazon::APA->new('http://webservices.amazon.com/onca/xml'); $u->query_form( Service => 'AWSECommerceService', Operation => 'ItemSearch', Title => shift || 'Perl', SearchIndex => 'Books', ); $u->sign( key => $public_key, secret => $private_key, ); my $ua = LWP::UserAgent->new; my $r = $ua->get($u); if ( $r->is_success ) { print YAML::Syck::Dump( XMLin( $r->content ) ); } else { print $r->status_line, $r->as_string; }
None.
This adds the following methods to URI object
Sings the URI accordingly to the Amazon Product Advertising API.
$u->sign( key => $public_key, secret => $private_key, );
Checks the signature within the URI;
print "The signature is " : $u->signature;
Dan Kogai, <dankogai at dan.co.jp>
<dankogai at dan.co.jp>
Please report any bugs or feature requests to bug-uri-amazon-apa at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=URI-Amazon-APA. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-uri-amazon-apa at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc URI::Amazon::APA
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=URI-Amazon-APA
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/URI-Amazon-APA
CPAN Ratings
http://cpanratings.perl.org/d/URI-Amazon-APA
Search CPAN
http://search.cpan.org/dist/URI-Amazon-APA/
http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?rest-signature.html
Copyright 2009 Dan Kogai, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install URI::Amazon::APA, copy and paste the appropriate command in to your terminal.
cpanm
cpanm URI::Amazon::APA
CPAN shell
perl -MCPAN -e shell install URI::Amazon::APA
For more information on module installation, please visit the detailed CPAN module installation guide.