Files | Admin

Notes:

Release Name: amazon-ecs-0.5.0

Notes:
Generic Amazon E-commerce REST API using Hpricot with configurable 
default options and method call options. Uses Response and 
Element classes for easy access access to REST XML output. Supports ECS 4.0.

It is generic, so you can easily extend Amazon::Ecs to support 
other not implemented REST operations; and it is also generic because it just wraps around
Hpricot element object, instead of providing one-to-one object/attributes to XML elements map.

If in the future, there is a change in REST XML output structure, 
no changes will be required on amazon-ecs library, 
instead you just need to change the element path.
Example:

# default options
Amazon::Ecs.options = {:aWS_access_key_id => [your developer token]}
res = Amazon::Ecs.item_search('ruby', {:response_group => 'Medium', :sort => 'salesrank'})

res.is_valid_request?     # return true request is valid
res.has_error?            # return true if there is an error
res.error                 # return error message if there is any
res.total_pages           # return total pages
res.total_results         # return total results

# traverse through each item
res.items.each do |item|      
   item.get('asin')
   item.get('itemattributes/title')
end



Changes: Initial release