Class: AmazonProductAdvertisingApi::Operations::Item::ItemSearch

Inherits:
Base::Request
  • Object
show all
Includes:
Common
Defined in:
lib/amazon_product_advertising_api/operations/item.rb

Overview

A class to represent the ItemSearch Operation. See AmazonProductAdvertisingApi::Operations::Base::Request for info relating to all Requests.

It mixes in AmazonProductAdvertisingApi::Operations::Item::Common for it’s parse method.

Constant Summary collapse

REQUEST_PARAMETERS =
:actor, :artist, :audience_rating, :author, :availability, :brand, :browse_node, :city,
:composer, :condition, :conductor, :director, :item_page, :keywords, :manufacturer, :maximum_price,
:merchant_id, :minimum_price, :neighborhood, :orchestra, :postal_code, :power, :publisher, :related_items_page,
:relationship_type, :review_sort, :search_index, :sort, :tag_page, :tags_per_page, :tag_sort, :text_stream, :title,
:variation_page, :response_group

Constants inherited from Base::Request

Base::Request::API_VERSION, Base::Request::SERVICE_URLS

Instance Attribute Summary

Attributes inherited from Base::Request

#errors, #hpricot_data, #is_valid, #operation, #raw_data, #region, #request_uri, #response

Instance Method Summary collapse

Methods included from Common

#parse

Methods inherited from Base::Request

#parse, #query_amazon, #run

Constructor Details

#initialize(keywords, search_index = "Books", region = :uk) ⇒ ItemSearch

ItemSearch requires keywords and a search index to be specified.



61
62
63
64
65
66
67
68
# File 'lib/amazon_product_advertising_api/operations/item.rb', line 61

def initialize(keywords, search_index = "Books", region = :uk)
  super()

  self.keywords     = keywords
  self.search_index = search_index
  self.operation    = "ItemSearch"
  self.region       = region
end