techcloud.com: a blog about web 2.0, search, cloud, collaboration, Ruby on Rails, Microsoft, Google, and other fun stuff

Compete Rails Plugin

I wrote a Compete.com API plugin for Rails.

The Compete.com API Rails plugin provides you with a communication class for interfacing directly with Compete. It returns data in XML format and provides a parsing method that will return the latest Compete statistics for easy inclusion in your application.

More information on the Compete.com API can be found here on the Compete developer network.

Compete is a really neat service for pulling web analytics, like how many unique visitors a month a website gets.

You can get it from github:

http://github.com/edla/compete/tree/master

The Compete.com API Rails plugin provides you with a communication
class for interfacing directly with Compete. It returns data in XML format and provides a parsing method that will return the latest Compete statistics for easy inclusion in your application.

=== Usage
Install the plugin from Git:

$ cd vendors/plugin
$ mkdir compete
$ git clone git@github.com:edla/compete.git

@cp = Compete::Base.new( :compete_api_key => YOUR_COMPETE_API_KEY)
@compete_xml = @cp.do( :url => 'www.google.com')
p @cp.parse( @compete_xml )

# {:uv_ranking=>"1", :uv_count=>"135,834,459", :month=>"06", :domain=>"google.com", :year=>"2008", :rank=>"1"}
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • email

TechCloud is Digg proof thanks to caching by WP Super Cache

ss_blog_claim=77c0780e64c123f107896646c0ee8870