A Ruby wrapper for the Chartbeat API
Add this line to your application's Gemfile:
gem 'chartbeat'
And then execute:
$ bundle
Or install it yourself as:
$ gem install chartbeat
c = Chartbeat::API.new
c = Chartbeat::API.new apikey: 'yourkey', host: 'yourdomain.com'
c = Chartbeat::API.new apikey: 'yourkey', host: 'yourdomain.com', since: (Time.now - 86400).to_i
real-time calls and options
c.histogram keys: 'R,W,I', breaks: '1,5,10'
c.pathsummary keys: 'I,n,r', types: 'n,n,s'
c.quickstats
c.recent
c.referrers
c.summary keys: 'I,n,r'
c.toppages
c.geo
historical calls and options
c.alerts since: 1233739200
c.snapshots api: 'pages', timestamp: 1233739200
c.stats
c.data_series type: 'summary', days: 1, minutes: 20
c.day_data_series type: 'paths', timestamp: 1233739200
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Copyright (c) 2012 Al Shaw. See LICENSE for details.