SYNOPSIS

  Net::Amazon::Validate::ItemSearch;

  my $valid   = Net::Amazon::Validate::ItemSearch::factory(search_index => 'Actor');
  my $option  = $itemsearch_valid->user_or_default($input);
  my $default = $itemsearch_valid->default();

DESCRIPTION

\*(C`Net::Amazon::Validate::ItemSearch\*(C' is a class used to verify ItemSearch operation based on the current version of the \s-1WSDL\s0 and locale. For example if an Artist search is executed the user can search against Classical, Merchants, or Music.

\s-1METHODS\s0

factory(search_index => type)

Constructs a new \*(C`Net::Amazon::Validate::ItemSearch\*(C' object, used to validate user input for a SearchIndex. Valid types include Actor, Artist, AudienceRating, Author Brand, BrowseNode, City, Composer, Condition, Conductor, Count, Cuisine, DeliveryMethod, Director, ISPUPostalCode, ItemPage, Keywords, MPAARating, Manufacturer, MaximumPrice, MerchantId, MinimumPrice, MusicLabel, Neighborhood, Orchestra, Power, Publisher, Sort, TextStream and Title. Which departments these search indexes are valid for is dependent upon locale.

default()

Return the default value for a given SearchIndex. Default are determined in order of preference and existence from the following list: Books, Music, \s-1DVD\s0, Software. If none of those items are valid for a given SearchIndex then the first valid department of said SearchIndex is used. If user input is specified it validates the input, and return it, otherwise it returns the default value for the SearchIndex.

AUTHORS

Christopher Boumenot, <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2006 by Christopher Boumenot, <[email protected]>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SYNOPSIS

use Net::Amazon::Validate::ItemSearch;

# ...

my $valid = Net::Amazon::Validate::ItemSearch::factory(search_index => 'Actor'); $valid->user_or_default($input); $valid->default();

DESCRIPTION

\s-1METHODS\s0

Asin()

The item's \s-1ASIN\s0 number.

Please check the subclasses of \*(C`Net::Amazon::Validate\*(C' for specialized methods.

TODO

I should probably add a function to dispatch calls automatically, that way the user doesn't have to explicity call a function to verify an option. It would make it very easy to write loops to validate input.

BUGS

This library was designed to validate ResponseGroup requests only. Support for other parameters were autogenerated but not verified. The biggest problems are with the intrepration of 'Integers 1 to 30', 'A Merchant \s-1ID\s0', or 'Amazon (the default value)'.

AUTHOR

Christopher Boumenot, <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2006 by Christopher Boumenot <[email protected]>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.