#!/usr/bin/ruby -w
#
# $Id: seller_listing_search1,v 1.1 2008/03/24 16:08:37 ianmacd Exp $

require 'amazon/aws'
require 'amazon/aws/search'

include Amazon::AWS
include Amazon::AWS::Search

seller_id = 'A33J388YD2MWJZ'
artist = 'Killing Joke'
sls = SellerListingSearch.new( 'A33J388YD2MWJZ', { 'Keywords' => artist } )
sls_rg = ResponseGroup.new( 'SellerListing' )

req = Request.new
req.locale = 'uk'

resp = req.search( sls, sls_rg )

items = resp.seller_listing_sets.seller_listings

puts 'Seller %s is selling the following items by %s:' % [ seller_id, artist ]
items.each { |item| puts item, '' }
