amazon-awis
Ruby Amazon Alexa web service REST API using Hpricot with configurable default options and method call options. Uses Response and Element wrapper classes for easy access to REST XML output.
Version: 0.1.0
INSTALLATION
$ gem install amazon-awis
EXAMPLE
require 'amazon/awis'
# set the default options; options will be camelized and converted to REST request parameters.
Amazon::Awis. = {:aws_access_key_id => [your access key]}
# to generate signed requests include your secret key:
Amazon::Awis. = {:aws_access_key_id => [your developer token], :aws_secret_key => [your secret access key]}
# alternatively,
Amazon::Awis.configure do ||
[:aws_access_key_id] = [your access key]
[:aws_secret_key] = [you secret key]
[:responsegroup] = 'Rank'
end
# options provided on method call will merge with the default options
res = Amazon::Awis.get_info('yahoo.com')
# some common response object methods
res.is_success? # return true if request was successful
#dynamic methods
res.rank # return the rank of domain name that was passed
res.dataurl # returns the url which was queried
Refer to Amazon ECS documentation for more information on Amazon REST request parameters and XML output: docs.amazonwebservices.com/AlexaWebInfoService/2005-07-11/
SOURCE CODES
LINKS
LICENSE
(The MIT License)
Copyright © 2009 Hasham Malik