Skip to content

hasham2/amazon-awis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

LICENSE

(The MIT License)

Copyright © 2009 Hasham Malik

About

Ruby Amazon Alexa web information service REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages