Class: Kekeewin::OauthAPI::Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/kekeewin.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



20
21
22
# File 'lib/kekeewin.rb', line 20

def access_token
  @access_token
end

#oauth_clientObject (readonly)

Returns the value of attribute oauth_client.



21
22
23
# File 'lib/kekeewin.rb', line 21

def oauth_client
  @oauth_client
end

Class Method Details

.accessObject



27
28
29
# File 'lib/kekeewin.rb', line 27

def self.access
  @access_token ||= OAuth2::AccessToken.new(self.client, Base.access_token)
end

.client(oauth_id = Base.oauth_id, oauth_secret = Base.oauth_secret, host = Base.host) ⇒ Object



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

def self.client(oauth_id = Base.oauth_id, oauth_secret = Base.oauth_secret, host = Base.host)
  @oauth_client ||= OAuth2::Client.new(oauth_id, oauth_secret, site: host)
end

.helloObject



31
32
33
# File 'lib/kekeewin.rb', line 31

def self.hello
  return "Hello, World!"
end