struct Twitch::Config::Token
- Twitch::Config::Token
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
twitch/config/token.crConstructors
- .generate(username : String, token_path : String, scope : Set(String), client_id : String, client_secret : String, force_new_code : Bool = false) : Token
- .new(access_token : String, refresh_token : String, expires_at : Time, scope : Set(String), token_type : String)
- .new(pull : JSON::PullParser)
- .refresh(username : String, token_path : String, client_id : String, client_secret : String, old_token : Token) : Token
- .save(username : String, token_path : String, token : Token) : Token
Class Method Summary
Instance Method Summary
- #access_token : String
- #clone
- #copy_with(access_token _access_token = @access_token, refresh_token _refresh_token = @refresh_token, expires_at _expires_at = @expires_at, scope _scope = @scope, token_type _token_type = @token_type)
- #expires_at : Time
- #refresh_token : String
- #scope : Set(String)
- #token_type : String
Constructor Detail
def self.generate(username : String, token_path : String, scope : Set(String), client_id : String, client_secret : String, force_new_code : Bool = false) : Token
#
def self.new(access_token : String, refresh_token : String, expires_at : Time, scope : Set(String), token_type : String)
#
def self.refresh(username : String, token_path : String, client_id : String, client_secret : String, old_token : Token) : Token
#
Class Method Detail
Instance Method Detail
def copy_with(access_token _access_token = @access_token, refresh_token _refresh_token = @refresh_token, expires_at _expires_at = @expires_at, scope _scope = @scope, token_type _token_type = @token_type)
#