Sha256: 07fd3675bba30e3c2a6f30a9ee7f17998ea83ee9ebd1b8cf71ba3942f85d5e49
Contents?: true
Size: 752 Bytes
Versions: 5
Compression:
Stored size: 752 Bytes
Contents
module SocialProfile module Providers class Vkontakte < Base def picture_url @picture_url ||= begin if auth_hash['extra'] && info = auth_hash['extra']['raw_info'] photo = info['photo_big'] || info['photo_200_orig'] Utils.blank?(photo) ? nil : photo end end end def profile_url @profile_url ||= begin urls = info('urls') urls.nil? ? nil : urls['Vkontakte'] end end # Возвращаемые значения: 1 - женский, 2 - мужской, 0 - без указания пола. # def gender @gender ||= (extra('raw_info')['sex'] || 0).to_i end end end end
Version data entries
5 entries across 5 versions & 1 rubygems