struct

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
Source
new(access_token : String, refresh_token : String, expires_at : Time, scope : Set(String), token_type : String)
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
refresh(username : String, token_path : String, client_id : String, client_secret : String, old_token : Token) : Token
Source
save(username : String, token_path : String, token : Token) : Token
Source

Class methods

load(username : String, token_path : String) : Token | Nil
Source

Instance methods

access_token
clone
Source
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)
Source
expires_at
refresh_token
scope
token_type

Nested types