Project

getclicky

0.02
No commit activity in last 3 years
No release in over 3 years
Ruby Wrapper for Clicky Analytics API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3.0
~> 3.0.0

Runtime

~> 3.3.1
 Project Readme

Clicky Analytics API Library

Gem Version Build Status Code Climate Test Coverage

A swiss knife ruby wrapper for Clicky Analytics API. For more information see: http://clicky.com/help/api.

Installation

## Gemfile for Rails, Sinatra
gem 'getclicky', '~> 0.1.4'

Usage

Ruby wrapper

First, you'll need to set up your site_id and sitekey. You can discover this information by accessing settings in your account at http://clicky.com.

Getclicky.configure do |config|
  config.site_id = "your site id here"
  config.sitekey = "your site key here"
  config.admin_sitekey = "your admin site key, if applicable"
end

Then you can simply instantiate a new Getclicky::Client object.

getclicky = Getclicky::Client.new

All types in API are methods here looks, you can find all types http://clicky.com/help/api:

getclicky.pages()
getclicky.tweets()
getclicky.visitors()

In each method you can pass optional parameters as a hash looks:

getclicky.visitors(:date => "last-7-days", :daily => 1)
getclicky.item(:date => "last-7-days", :item => "google.com")
getclicky.visitors_list(:domain => "google.com")

You can also request more than one data type in a single request:

getclicky.multiple([:pages, :downloads], {:date => "last-7-days"})

By default clicky API returns an array of Hashies as data, but you can change by providing an :output parameter like:

JSON
getclicky.visitors(:output => :json, :date => "last-7-days", :daily => 1)
XML
getclicky.visitors(:output => :xml, :date => "last-7-days", :daily => 1)

Enjoy!

Roadmap

  • Improve the tests

Author

Collaborators