Status
This project is in active development as of 2010-12.
Installation
Copy or symlink into your application’s /lib folder.
In your ApplicationController:
class ApplicationController < ActionController::Base
include Amazonian
end
Then create an initializer in config/initializers:
require 'amazonian'
Amazonian.setup do |config|
#Put your Amazon Web Services Key and Secret Key in here
config.secret = '<>'
config.key = '<>'
# prints more debug info to the console. Default: false
# config.debug = true
# the default default_search is :All, other tempting options: :Music, :GourmetFood, etc
config.default_search = :Music
# the gem will attempt to filter out duplicate requests. Default: true
config.cache_last = true
end
Usage
Amazonian.asin "1430218150"
#=> #<Amazonian::Item>
Amazonian.search "The art of Computer Programming" #Title
Amazonian.search "978-0201853926" #ISBN-13
Amazonian.search "0201853922" #ISBN-10
Amazonian.search "<whateveryouwant>" #Anything you might put in the search box on Amazon.com.
#=> #<Amazonian::Search>
Info
For more information on the REST calls, have a look at the whole Amazon E-Commerce-API.