(self)
return Spotify._web_client
Returns the web client if it was already created.
        If not, it is created using the spotify credentials from the database.
Returns the web client if it was already created.
        If not, it is created using the spotify credentials from the database.
Returns the web client if it was already created . If not it is created using the spotify credentials from the database .
def web_client(self) -> OAuthClient:
        """Returns the web client if it was already created.
        If not, it is created using the spotify credentials from the database."""
        if Spotify._web_client is None:
            client_id = storage.get(key="spotify_client_id")
            client_secret = storage.get(key="spotify_client_secret")
            Spotify._web_client = OAuthClient(
                base_url="https://api.spotify.com/v1",
                refresh_url="https://auth.mopidy.com/spotify/token",
                client_id=client_id,
                client_secret=client_secret,
            )
        return Spotify._web_client
def web_client ( self ) -> OAuthClient : if Spotify . _web_client is None : client_id = storage . get ( key = "spotify_client_id" ) client_secret = storage . get ( key = "spotify_client_secret" ) Spotify . _web_client = OAuthClient ( base_url = "https://api.spotify.com/v1" , refresh_url = "https://auth.mopidy.com/spotify/token" , client_id = client_id , client_secret = client_secret , ) return Spotify . _web_client