Ruby Amazon Alexa web information service REST API
Ruby
Switch branches/tags
Nothing to show
Latest commit 0253dd8 Jan 16, 2012
hasham2 Merge pull request #1 from Flushot/master
Fixed broken AWIS request signing code, which was resulting in authentication errors being thrown. It appears the code was using an old signing method that eventually got deprecated on 5/25/11.

README.rdoc

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.options = {:aws_access_key_id => [your access key]}

# to generate signed requests include your secret key:
Amazon::Awis.options = {:aws_access_key_id => [your developer token], :aws_secret_key => [your secret access key]}

# alternatively,
Amazon::Awis.configure do |options|
    options[:aws_access_key_id] = [your access key]
    options[:aws_secret_key] = [you secret key]
    options[:responsegroup] = 'Rank'
end

#Call get_info method to get website info
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 AWIS 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