1######################################################################
2package Net::Amazon::Request::ISBN;
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, qw(isbn));
14
15    $class->_convert_option(\%options,
16                            'isbn',
17                            'ItemId');
18
19	$options{'IdType'} = 'ISBN';
20	$options{'SearchIndex'} = 'Books';
21
22    my $self = $class->SUPER::new(%options);
23
24    bless $self, $class;   # reconsecrate
25}
26
271;
28
29__END__
30
31=head1 NAME
32
33Net::Amazon::Request::ISBN- request class for ISBN search
34
35=head1 SYNOPSIS
36
37  use Net::Amazon;
38  use Net::Amazon::Request::ISBN;
39
40  my $ua = Net::Amazon->new(
41      token       => 'YOUR_AMZN_TOKEN'
42  );
43
44  my $req = Net::Amazon::Request::ISBN->new(
45      isbn => '9783570009222',
46  );
47
48    # Response is of type Net::Amazon::Response::ISBN
49  my $resp = $ua->request($req);
50
51=head1 DESCRIPTION
52
53C<Net::Amazon::Request::ISBN> is a class used to submit ISBN (International
54Standard Book Number) search requests to the Amazon web service.
55
56The ISBN number to search for is specified in the C<ISBN> parameter.
57
58Upon success, the response's C<properties()> method will return a single
59C<Net::Amazon::Property::Book> object.
60
61=head2 METHODS
62
63=over 4
64
65=item new(isbn => $isbn)
66
67Constructs a new C<Net::Amazon::Request::ISBN> object, used to query the Amazon
68web service for an item with the given ISBN number.  As of 2007-01-17 Amazon
69supports 13-digit ISBNs.  To construct a 13-digit ISBN from a 10-digit ISBN
70simply prepended 978 to the ISBN.  The ISBN must not contain hyphens.
71
72It appears that not all 10-digit ISBNs can be turned into 13-digit ISBNs by
73prepending 978.  Amazon lists the 13-digit ISBN alongside 10-digit ISBN.
74
75=back
76
77=head1 AUTHOR
78
79Christopher Boumenot, E<lt>boumenot@gmail.comE<gt>
80
81=head1 COPYRIGHT AND LICENSE
82
83Copyright 2007 by Christopher Boumenot E<lt>boumenot@gmail.comE<gt>
84
85This library is free software; you can redistribute it and/or modify
86it under the same terms as Perl itself.
87
88=cut
89