class Amazon::Search::Exchange::ThirdParty::Request
Public Instance Methods
seller_search(seller_id, weight=HEAVY, offer_status='open', page=1, &block)
click to toggle source
Search Amazon third-party sellers by ID and return an Amazon::Search::Exchange::ThirdParty::Response. If a block is supplied, that Response's @products, which is an Array of Amazon::Exchange::Product objects, will be passed to the block.
# File lib/amazon/search/exchange/thirdparty.rb, line 34 def seller_search(seller_id, weight=HEAVY, offer_status='open', page=1, &block) # this search type not available for international sites unless @locale == 'us' raise LocaleError, "search type invalid in '#{@locale}' locale" end url = AWS_PREFIX + "?t=%s&SellerSearch=%s&f=xml&type=%s" + "&dev-t=%s&page=%s" type = WEIGHT[weight] if ThirdParty.offer_status_types.include? offer_status url << "&offerstatus=" << offer_status else raise StatusError, "'offer_status' must be one of %s" % ThirdParty.offer_status_types.join(', ') end search(url % [@id, seller_id, type, @token, page], &block) end