jukebox.py
def refresh_token(
    sp_auth: SpotifyOAuth, sp: spotipy.client.Spotify, whole_token: Dict
) -> Dict:
    """Refreshes the spotify OAuth token.
    Parameter sp_auth: SpotifyOAuth object with username and all details included (e.g. scope)
    Parameter sp: spotipy.Spotify, state will be modified and returned.
    Parameter whole_token: Doct, token return by spotify api. Updated and saved at end.
    """
    logging.info("Refreshing spotify token...\n")
    logging.debug(f"Cached access token info: {whole_token}")
    token_info = sp_auth.refresh_access_token(whole_token["refresh_token"])
    token = token_info["access_token"]
    sp = spotipy.Spotify(auth=token)
    return token_info, sp
Refreshes the spotify OAuth token.
    Parameter sp_auth: SpotifyOAuth object with username and all details included (e.g. scope)
    Parameter sp: spotipy.Spotify, state will be modified and returned.
    Parameter whole_token: Doct, token return by spotify api. Updated and saved at end.
    
Refreshes the spotify OAuth token.
Parameter sp_auth: SpotifyOAuth object with username and all details included
Parameter sp: spotipy.Spotify, state will be modified and returned.
Parameter whole_token: Doct, token return by spotify api. Updated and saved at end.
Refreshes the spotify OAuth token . Parameter sp_auth : SpotifyOAuth object with username and all details included Parameter sp : spotipy . Spotify state will be modified and returned . Parameter whole_token : Doct token return by spotify api . Updated and saved at end .
def refresh_token(
    sp_auth: SpotifyOAuth, sp: spotipy.client.Spotify, whole_token: Dict
) -> Dict:
    logging.info("Refreshing spotify token...\n")
    logging.debug(f"Cached access token info: {whole_token}")
    token_info = sp_auth.refresh_access_token(whole_token["refresh_token"])
    token = token_info["access_token"]
    sp = spotipy.Spotify(auth=token)
    return token_info, sp
def refresh_token ( sp_auth : SpotifyOAuth , sp : spotipy . client . Spotify , whole_token : Dict ) -> Dict : logging . info ( "Refreshing spotify token...\n" ) logging . debug ( f"Cached access token info: {whole_token}" ) token_info = sp_auth . refresh_access_token ( whole_token [ "refresh_token" ] ) token = token_info [ "access_token" ] sp = spotipy . Spotify ( auth = token ) return token_info , sp
Refreshes the spotify OAuth token.
Refreshes the spotify OAuth token .
"""Refreshes the spotify OAuth token.
    Parameter sp_auth: SpotifyOAuth object with username and all details included (e.g. scope)
    Parameter sp: spotipy.Spotify, state will be modified and returned.
    Parameter whole_token: Doct, token return by spotify api. Updated and saved at end.
    """
sp_auth
SpotifyOAuth
sp
spotipy.client.Spotify
whole_token
Dict