Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ralexa

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ralexa

  • 0.0.9
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Ralexa

Ruby client for Amazon Alexa APIs.

These include Alexa Top Sites and Alexa Web Information Service.

HTTP transport thanks to Net::HTTP, with a little help from addressable.

XML parsing courtesy of Nokogiri.

Thorough test coverage provided by MiniTest::Spec.

Installation

# with bundler
echo 'gem "ralexa"' >> Gemfile
bundle

# or just the gem
gem install ralexa

Usage Examples


# grab a Ralexa::Session instance to hold your credentials.
session = Ralexa.session("aws_access_key_id", "aws_secret_access_key")

# all countries
countries = session.top_sites.list_countries
p countries.map(&:name)

# global top 250 sites
global = session.top_sites.global(250)

# per-country top sites
first_by_country = {}
countries.each do |c|
  first_by_country[c.name] = session.top_sites.country(c.code, 1).first.url
end

# individual country lookup
puts "Top Ten Australian Sites"
session.top_sites.country("AU", 10).each do |s|
  puts "#{s.url} (#{s.page_views} pageviews)"
end

# url info for an individual site
puts "Url info of Flippa.com"
puts session.url_info.get("http://flippa.com")

puts "bam!"

Status

ServiceActionResponseGroupSupported
Alexa Top SitesTopSitesGlobalYes
CountryYes
ListCountriesYes
Alexa Web Information ServicesUrlInfoGetYes
TrafficHistory*Send a pull request!
CategoryBrowse*Send a pull request!
CategoryListings*Send a pull request!
SitesLinkingIn*Send a pull request!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b some-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin some-new-feature)
  5. Create new Pull Request

License

(c) 2012 Flippa, The MIT License.

FAQs

Package last updated on 17 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc