Last active
August 29, 2015 14:26
-
-
Save rserna2010/48b25ed2ac8a00cc039c to your computer and use it in GitHub Desktop.
This file contains 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
require 'Gmail' | |
Gmail.client_id = ENV['OMNIAUTH_CLIENT_ID'] | |
Gmail.client_secret = ENV['OMNIAUTH_CLIENT_SECRET'] | |
Gmail.refresh_token = refresh_token | |
service = Google::APIClient.new.discovered_api('gmail', 'v1') | |
Gmail.client.execute( | |
:api_method => service.users.labels.list, | |
:parameters => {'userId' => 'me'}, | |
:headers => {'Content-Type' => 'application/json'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment