1###################################################################### 2package Net::Amazon::Request::Power; 3###################################################################### 4use warnings; 5use strict; 6use base qw(Net::Amazon::Request); 7 8################################################## 9sub new { 10################################################## 11 my($class, %options) = @_; 12 13 $class->_assert_options_defined(\%options, 14 qw(power)); 15 16 $class->_convert_option(\%options, 17 'power', 18 'Power'); 19 20 my $self = $class->SUPER::new(%options); 21 22 $self->_convert_itemsearch(); 23 24 bless $self, $class; # reconsecrate 25} 26 271; 28 29__END__ 30 31=head1 NAME 32 33Net::Amazon::Request::Power - request class for 'Power Search' 34 35=head1 SYNOPSIS 36 37 use Net::Amazon; 38 use Net::Amazon::Request::Power; 39 40 my $ua = Net::Amazon->new( 41 token => 'YOUR_AMZN_TOKEN' 42 ); 43 44 my $req = Net::Amazon::Request::Power->new( 45 power => 'subject: perl and author: schwartz', 46 mode => 'books', 47 ); 48 49 # Response is of type Net::Amazon::Response::Power 50 my $resp = $ua->request($req); 51 52=head1 DESCRIPTION 53 54C<Net::Amazon::Request::Power> is a class used to request 55so-called I<Power Searches> from the Amazon web service. 56 57The C<power> parameter specifies the power search string, C<mode> 58defines which properties to look for. 59 60Upon success, the response's C<properties()> method will return a list 61of C<Net::Amazon::Property::*> objects. 62 63=head2 METHODS 64 65=over 4 66 67=item new(power => $search_string, mode => $property) 68 69Constructs a new C<Net::Amazon::Request::Power> object. C<$property> 70is typically C<"books">. Examples for C<$search_string> are: 71 72 author: schwartz 73 74 author: schwartz and pubdate: after 10-2002 75 76 subject: perl and (objects or object-oriented) 77 78 keywords: "high tech*" and not fiction and pubdate: during 1999 79 80 power "author: randal schwartz and publisher: Addison Wesley" 81 82 author: randal schwartz and title: object books 83 84See the "Amazon Web Services 2.1 API and Integration Guide" for details. 85 86=back 87 88Check L<Net::Amazon::Request> for common request parameters not listed here. 89 90=head1 AUTHORS 91 92Martin Streicher, E<lt>martin.streicher@apress.comE<gt> 93Mike Schilli, E<lt>m@perlmeister.comE<gt> 94 95=cut 96