piwik
Get Version
0.0.2→ ‘piwik’
What
A simple Ruby client for the Piwik API.
Installing
From RubyForge:
sudo gem install piwik
From Github (with RubyGems >= 1.2.0):
sudo gem sources -a http://gems.github.com # you only have to do this once sudo gem install riopro-piwik
The basics
Piwik is an open source web analytics software, written in PHP. It provides an extensive REST-like API, and this gem aims to be a simple Ruby wrapper to access this API in a Ruby-friendly way.
For more information on Piwik and it’s API, see the Piwik website and the Piwik API reference.
Features / Problems
- Object-oriented interface to the Piwik API;
- For now, only a small subset of the API is implemented (only basic actions)
Demonstration of usage
>> require 'rubygems' => [] >> require 'piwik' => [] >> site = Piwik::Site.load(1, 'http://your.piwi.install', 'some_auth_key') => #<Piwik::Site:0xb74bf994 @name="Example.com", @config={:auth_token=>"some_auth_key", :piwik_url=>"http://your.piwi.install"}, @id=1, @main_url="http://www.example.com", @created_at=Tue Jul 15 18:55:40 -0300 2008> >> site.pageviews(:month, Date.today) => 88
More information
Browse the piwik RDocs here
Source code access
You can fetch the source from:
git clone git://github.com/riopro/piwik.git
Build and test instructions
cd piwik rake test rake install_gem
License
This code is free to use under the terms of the MIT license.
Contact
Comments are welcome. Send an email to Rodrigo Tassinari de Oliveira
Riopro Informática Ltda, 23rd July 2008
Theme extended from Paul Battley