Created
October 1, 2009 03:23
-
-
Save tpitale/198692 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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