Class: Amazon::AWS::ItemSearch
Overview
This is the class for the most common type of AWS look-up, an ItemSearch. This allows you to search for items that match a set of broad criteria. It returns items for sale by Amazon merchants and most types of seller.
Constant Summary collapse
- SEARCH_INDICES =
Not all search indices work in all locales. It is the user’s responsibility to ensure that a given index is valid within a given locale.
According to the AWS documentation:
-
All searches through all indices (but currently exists only in the US locale).
-
Blended combines Apparel, Automotive, Books, DVD, Electronics, GourmetFood, Kitchen, Music, PCHardware, PetSupplies, Software, SoftwareVideoGames, SportingGoods, Tools, Toys, VHS and VideoGames.
-
Merchants combines all search indices for a merchant given with MerchantId.
-
Music combines the Classical, DigitalMusic, and MusicTracks indices.
-
Video combines the DVD and VHS search indices.
Note that page 53 of the PDF of the AWS Developer Guide (revision 2009-01-06) contains an outdated description of Blended with too few subindices. Page 95 of the PDF contains the correct list.
-
%w[ All Apparel Automotive Baby Beauty Blended Books Classical DigitalMusic DVD Electronics ForeignBooks GourmetFood Grocery HealthPersonalCare Hobbies HomeGarden Industrial Jewelry KindleStore Kitchen Magazines Merchants Miscellaneous MP3Downloads Music MusicalInstruments MusicTracks OfficeProducts OutdoorLiving PCHardware PetSupplies Photo SilverMerchant Software SoftwareVideoGames SportingGoods Tools Toys VHS Video VideoGames Watches Wireless WirelessAccessories ]
Constants inherited from Operation
Instance Attribute Summary
Attributes inherited from Operation
Instance Method Summary collapse
-
#initialize(search_index, parameters) ⇒ ItemSearch
constructor
Search AWS for items.
Methods inherited from Operation
Constructor Details
#initialize(search_index, parameters) ⇒ ItemSearch
Search AWS for items. search_index must be one of SEARCH_INDICES and parameters is an optional hash of parameters that further refine the scope of the search.
Example:
is = ItemSearch.new( 'Books', { 'Title' => 'ruby programming' } )
In the above example, we search for books with Ruby Programming in the title.
881 882 883 884 885 886 887 |
# File 'lib/amazon/aws.rb', line 881 def initialize(search_index, parameters) unless SEARCH_INDICES.include? search_index.to_s raise "Invalid search index: #{search_index}" end super( { 'SearchIndex' => search_index }.merge( parameters ) ) end |