Skip to content

Instantly share code, notes, and snippets.

@jonmarkgo
Created May 3, 2013 01:02
Show Gist options
  • Save jonmarkgo/5506562 to your computer and use it in GitHub Desktop.
Save jonmarkgo/5506562 to your computer and use it in GitHub Desktop.
before do
@base_url = "https://myserver.com"
@twilio = Twilio::REST::Client.new "ACxxxxxxxxxxxxxxxxxxxxxxxx", "yyyyyyyyyyyyyyyyyyyyyyyyy"
@client = Google::APIClient.new
@client.authorization.client_id = "1234.apps.googleusercontent.com"
@client.authorization.client_secret = "ITSASECRET"
@client.authorization.scope = [
"https://www.googleapis.com/auth/glass.timeline",
"https://www.googleapis.com/auth/userinfo.profile"
]
@client.authorization.redirect_uri = to("/oauth2callback")
@client.authorization.code = params[:code] if params[:code]
@glass = @client.discovered_api( "mirror", "v1" )
@oauth2 = @client.discovered_api( "oauth2", "v2" )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment