| Class | Amazon::AWS::ItemSearch |
| In: |
lib/amazon/aws.rb
|
| Parent: | Operation |
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.
| SEARCH_INDICES | = | %w[ All Apparel Hobbies PetSupplies Automotive HomeGarden Photo Baby Jewelry Software Beauty Kitchen SoftwareVideoGames Blended Magazines SportingGoods Books Merchants Tools Classical Miscellaneous Toys DigitalMusic Music VHS DVD MusicalInstruments Video Electronics MusicTracks VideoGames ForeignBooks OfficeProducts Wireless GourmetFood OutdoorLiving WirelessAccessories HealthPersonalCare PCHardware ] |
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:
|
Search AWS for items. search_index must be one of SEARCH_INDICES and parameters is a hash of relevant search parameters.
Example:
is = ItemSearch.new( 'Books', { 'Title' => 'ruby programming' } )
In the above example, we search for books with Ruby Programming in the title.
# File lib/amazon/aws.rb, line 784 def initialize(search_index, parameters) unless SEARCH_INDICES.include? search_index.to_s raise "Invalid search index: #{search_index}" end parameter_check( parameters ) super( { 'SearchIndex' => search_index }.merge( parameters ) ) end