Sha256: c3f82cde9a58259d5835662244ef62513cbeb96d90f023c7386054e98d62028b
Contents?: true
Size: 694 Bytes
Versions: 13
Compression:
Stored size: 694 Bytes
Contents
module Kosher class Request < Sucker::Request def initialize(args={}) super add_parameters end def batchify(asins) self.<<({ 'ItemLookup.1.ItemId' => asins[0, 10] }) self.<<({ 'ItemLookup.2.ItemId' => asins[10, 10] }) if asins.size > 10 end def get Algorithm.new(super) end private def add_parameters self.<<({ 'Operation' => 'ItemLookup', 'ItemLookup.Shared.IdType' => 'ASIN', 'ItemLookup.Shared.Condition' => 'All', 'ItemLookup.Shared.MerchantId' => 'All', 'ItemLookup.Shared.ResponseGroup' => ['OfferFull', 'SalesRank'] }) end end end
Version data entries
13 entries across 13 versions & 1 rubygems