Skip to content

Instantly share code, notes, and snippets.

@tpitale
Created October 1, 2009 03:23
Show Gist options
  • Select an option

  • Save tpitale/198692 to your computer and use it in GitHub Desktop.

Select an option

Save tpitale/198692 to your computer and use it in GitHub Desktop.
Garb::Session.login('username', 'password')
class Report
include Garb::Resource
metrics :pageviews
end
Garb::Account.all.each do |account|
profile = account.profiles.first
daydata = Report.results(profile, :start_date => yesterday, :end_date => today)
weekdata = Report.results(profile, :start_date => lastweek, :end_date => today)
monthdata = Report.results(profile, :start_date => lastmonth, :end_date => today)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment