class OmniAuth::Strategies::DrChrono
Public Instance Methods
access_token()
click to toggle source
# File lib/omniauth/strategies/drchrono.rb, line 40 def access_token ::OAuth2::AccessToken.new(client, oauth2_access_token.token, { :expires_in => oauth2_access_token.expires_in, :expires_at => oauth2_access_token.expires_at }) end
Also aliased as: oauth2_access_token
callback_url()
click to toggle source
# File lib/omniauth/strategies/drchrono.rb, line 34 def callback_url full_host + script_name + callback_path end
doctor()
click to toggle source
# File lib/omniauth/strategies/drchrono.rb, line 51 def doctor @doctor ||= access_token.get(doctors_endpoint).parsed end
offices()
click to toggle source
# File lib/omniauth/strategies/drchrono.rb, line 55 def offices @offices ||= access_token.get(offices_endpoint).parsed['results'] end
raw_info()
click to toggle source
# File lib/omniauth/strategies/drchrono.rb, line 47 def raw_info @raw_info ||= access_token.get(profile_endpoint).parsed end
Private Instance Methods
doctors_endpoint()
click to toggle source
# File lib/omniauth/strategies/drchrono.rb, line 65 def doctors_endpoint "doctors/#{raw_info['doctor']}" end
offices_endpoint()
click to toggle source
# File lib/omniauth/strategies/drchrono.rb, line 69 def offices_endpoint 'offices' end
profile_endpoint()
click to toggle source
# File lib/omniauth/strategies/drchrono.rb, line 61 def profile_endpoint 'users/current' end