Module: Orkut::Connection

Included in:
API
Defined in:
lib/orkut/connection.rb

Instance Method Summary collapse

Instance Method Details

#authorization_uri(options = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/orkut/connection.rb', line 10

def authorization_uri(options={})
  client = Google::APIClient.new

  client.authorization.client_id     = client_id
  client.authorization.client_secret = client_secret
  client.authorization.scope         = scope
  client.authorization.redirect_uri  = redirect_uri

  orkut = client.discovered_api('orkut', 'v2')

  client.authorization.authorization_uri.to_s
end

#get_connection_hashObject



23
24
25
# File 'lib/orkut/connection.rb', line 23

def get_connection_hash
  return get_token_values(connection.authorization)
end