Class: Twilio::REST::Oauth

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/oauth.rb,
lib/twilio-ruby/rest/oauth/v1.rb,
lib/twilio-ruby/rest/oauth/v1/oauth.rb,
lib/twilio-ruby/rest/oauth/v1/token.rb,
lib/twilio-ruby/rest/oauth/v1/user_info.rb,
lib/twilio-ruby/rest/oauth/v1/device_code.rb,
lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb

Defined Under Namespace

Classes: V1

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Oauth

Initialize the Oauth Domain



14
15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/oauth.rb', line 14

def initialize(twilio)
  super

  @base_url = 'https://oauth.twilio.com'
  @host = 'oauth.twilio.com'
  @port = 443

  # Versions
  @v1 = nil
end

Instance Method Details

#device_codeTwilio::REST::Oauth::V1::DeviceCodeInstance



39
40
41
# File 'lib/twilio-ruby/rest/oauth.rb', line 39

def device_code
  self.v1.device_code()
end

#oauthTwilio::REST::Oauth::V1::OauthInstance



33
34
35
# File 'lib/twilio-ruby/rest/oauth.rb', line 33

def oauth
  self.v1.oauth()
end

#openid_discoveryTwilio::REST::Oauth::V1::OpenidDiscoveryInstance



45
46
47
# File 'lib/twilio-ruby/rest/oauth.rb', line 45

def openid_discovery
  self.v1.openid_discovery()
end

#to_sObject

Provide a user friendly representation



63
64
65
# File 'lib/twilio-ruby/rest/oauth.rb', line 63

def to_s
  '#<Twilio::REST::Oauth>'
end

#tokenTwilio::REST::Oauth::V1::TokenInstance



51
52
53
# File 'lib/twilio-ruby/rest/oauth.rb', line 51

def token
  self.v1.token()
end

#user_infoTwilio::REST::Oauth::V1::UserInfoInstance



57
58
59
# File 'lib/twilio-ruby/rest/oauth.rb', line 57

def 
  self.v1.()
end

#v1Object

Version v1 of oauth



27
28
29
# File 'lib/twilio-ruby/rest/oauth.rb', line 27

def v1
  @v1 ||= V1.new self
end