Twitch::Config::Token
Inherits JSON::Serializable < Struct < Value < Object
Constructors
generate(username : String, token_path : String, scope : Set(String), client_id : String, client_secret : String, force_new_code : Bool = false) : Token
Sourcenew(access_token : String, refresh_token : String, expires_at : Time, scope : Set(String), token_type : String)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
Sourcerefresh(username : String, token_path : String, client_id : String, client_secret : String, old_token : Token) : Token
Sourcesave(username : String, token_path : String, token : Token) : Token
SourceClass methods
load(username : String, token_path : String) : Token | Nil
SourceInstance methods
access_token
clone
Sourcecopy_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)
Sourceexpires_at
refresh_token
scope
token_type