Skip to content

Instantly share code, notes, and snippets.

@courtsimas
Created May 15, 2011 18:16
Show Gist options
  • Save courtsimas/973380 to your computer and use it in GitHub Desktop.
Save courtsimas/973380 to your computer and use it in GitHub Desktop.
def self.fetch_accounts(token)
results = nil
results = Gattica.new({ :token => token,
:profile_id => GoogleAnalytics.config[:profile_id],
:timeout => 500 }) if token.present?
if results.blank?
results = Gattica.new({ :email => GoogleAnalytics.config[:email],
:password => GoogleAnalytics.config[:password],
:profile_id => GoogleAnalytics.config[:profile_id],
:timeout => 500 })
end
results
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment