import spotipy
from spotipy.oauth2 import SpotifyPKCE

class Authorize:
    def __init__(self):
        self.scope = "playlist-modify-public user-read-playback-state user-read-currently-playing user-read-recently-played user-follow-read"
        self.auth_sp = ""
        
    def auth(self):
        sp_oauth = SpotifyPKCE(
            client_id="f38cce15a46f4448a3e8455f2d66ed84", #NOTE YOUR CLIENT_ID HERE
            redirect_uri="http://127.0.0.1:8888/callback", #NOTE YOUR REDIRECT HERE
            scope=self.scope)

        self.auth_sp = spotipy.Spotify(auth_manager=sp_oauth) 

        return self.auth_sp
