Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby wrapper for the chartbeat API
Ruby
branch: master
Failed to load latest commit information.
lib deprecate summize and add quickstats
spec add quickstats spec
.document
.gitignore Initial commit to chartbeat.
LICENSE Initial commit to chartbeat.
README.md deprecate summize and add quickstats
Rakefile regnerate gemspec for 0.2.0
VERSION Version bump to 0.2.2
chartbeat.gemspec regenerated gemspec for 0.2.2

README.md

chartbeat

A Ruby wrapper for the Chartbeat API

Install

gem install chartbeat

Usage

c = Chartbeat.new :apikey => 'yourkey', :host => 'yourdomain.com'    

real-time calls and options

c.pages            :path => '/'
c.pathsummary      :keys => 'n', :types => 'n'
c.recent           :limit => 2, :path => '/'
c.quickstats       :path => '/'
c.toppages         :limit => 10

historical calls and options

c.alerts           :since => 1276980619
c.snapshots        :timestamp => 1276980619
c.stats
c.data_series      #not working right now
c.day_data_series  :timestamp => 1276980619, :type => 'paths'

other calls and options

c.histogram        :keys => 'n', :breaks => 'n', :path => '/'
c.summary          :keys => 'n', :types => 'n', :path => '/'

Deprecated methods

c.summize #use quickstats instead

Notes

  • Chartbeat is currently returning blank arrays for alerts and an error for data_series at this time. I'll put out an update with tests for these calls when this is fixed.

  • For calls requiring timestamp, this gem defaults to 24 hours ago.

Copyright

Copyright (c) 2010 Al Shaw. See LICENSE for details.

Something went wrong with that request. Please try again.