Class: AmazonProductAdvertisingApi::Operations::Item::SimilarityLookup

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

Overview

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

Despite not following the same naming convention of other classes in this module, it returns data structured the same way so has been put here.

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

Constant Summary collapse

REQUEST_PARAMETERS =
:condition, :item_id, :merchant_id, :similarity_type, :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(item_id, region = :uk) ⇒ SimilarityLookup

SimilarityLookup only requires an item id (ASIN) to be specified.



133
134
135
136
137
138
139
# File 'lib/amazon_product_advertising_api/operations/item.rb', line 133

def initialize(item_id, region = :uk)
  super()
  
  self.item_id   = item_id
  self.operation = "SimilarityLookup"
  self.region    = region
end