Class: OmniAuth::Strategies::YouTube

Inherits:
OAuth2
  • Object
show all
Defined in:
lib/omniauth/strategies/youtube.rb

Instance Method Summary collapse

Instance Method Details

#userObject



41
42
43
# File 'lib/omniauth/strategies/youtube.rb', line 41

def user
  user_hash['entry']
end

#user_hashObject



45
46
47
# File 'lib/omniauth/strategies/youtube.rb', line 45

def user_hash
  @user_hash ||= MultiJson.decode(@access_token.get("http://gdata.youtube.com/feeds/api/users/default?alt=json").body)
end

#user_infoObject



49
50
51
# File 'lib/omniauth/strategies/youtube.rb', line 49

def 
  @raw_info ||= @access_token.get('https://www.googleapis.com/oauth2/v1/userinfo').parsed
end