From bcbf441e09fb502cf64924ff2530fa144bdf52c5 Mon Sep 17 00:00:00 2001 From: Andreas Brachold Date: Mon, 13 Aug 2007 18:41:27 +0000 Subject: * Move files to trunk --- lib/Net/Amazon/Request/UPC.pm | 94 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 lib/Net/Amazon/Request/UPC.pm (limited to 'lib/Net/Amazon/Request/UPC.pm') diff --git a/lib/Net/Amazon/Request/UPC.pm b/lib/Net/Amazon/Request/UPC.pm new file mode 100644 index 0000000..ae77645 --- /dev/null +++ b/lib/Net/Amazon/Request/UPC.pm @@ -0,0 +1,94 @@ +###################################################################### +package Net::Amazon::Request::UPC; +###################################################################### +use warnings; +use strict; +use base qw(Net::Amazon::Request); + +################################################## +sub new { +################################################## + my($class, %options) = @_; + + $class->_assert_options_defined(\%options, 'upc'); + + $class->_convert_option(\%options, + 'upc', + 'UpcSearch'); + + my $self = $class->SUPER::new(%options); + + bless $self, $class; # reconsecrate +} + +1; + +__END__ + +=head1 NAME + +Net::Amazon::Request::UPC - request class for UPC search + +=head1 SYNOPSIS + + use Net::Amazon; + use Net::Amazon::Request::UPC; + + my $ua = Net::Amazon->new( + token => 'YOUR_AMZN_TOKEN' + ); + + my $req = Net::Amazon::Request::UPC->new( + upc => '724381198421', + mode => 'music', + + ); + + # Response is of type Net::Amazon::Response::UPC + my $resp = $ua->request($req); + +=head1 DESCRIPTION + +C is a class used to submit UPC (product barcode) +search requests to the Amazon web service. + +The UPC number to search for is specified in the C parameter. +It currently works with the following values of the C parameter: +C, +C, +C, +C, +C