Class: Token

Inherits:
Object
  • Object
show all
Includes:
Constants
Defined in:
lib/ft_42.rb

Constant Summary

Constants included from Constants

Constants::HOURS_NEEDED, Constants::SECRET_42, Constants::UID_42, Constants::URL_42

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeToken

Returns a new instance of Token.



65
66
67
68
# File 'lib/ft_42.rb', line 65

def initialize
  client = OAuth2::Client.new(UID_42, SECRET_42, site: URL_42)
  @token = client.client_credentials.get_token
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



63
64
65
# File 'lib/ft_42.rb', line 63

def token
  @token
end