Class: Kekeewin::OauthAPI::Auth
- Inherits:
-
Object
- Object
- Kekeewin::OauthAPI::Auth
- Defined in:
- lib/kekeewin.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#oauth_client ⇒ Object
readonly
Returns the value of attribute oauth_client.
Class Method Summary collapse
- .access ⇒ Object
- .client(oauth_id = Base.oauth_id, oauth_secret = Base.oauth_secret, host = Base.host) ⇒ Object
- .hello ⇒ Object
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
20 21 22 |
# File 'lib/kekeewin.rb', line 20 def access_token @access_token end |
#oauth_client ⇒ Object (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
.access ⇒ Object
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 |
.hello ⇒ Object
31 32 33 |
# File 'lib/kekeewin.rb', line 31 def self.hello return "Hello, World!" end |