Esempio n. 1
0
def data_client(user_token):
    """
    Provides a client with a user token.
    """
    sender = tk.RetryingSender(sender=tk.SyncSender())
    yield tk.Spotify(user_token, sender=sender)
    sender.close()
Esempio n. 2
0
def app_client(app_token):
    """
    Provides a client with an application token.
    """
    sender = tk.RetryingSender(sender=tk.SyncSender())
    yield tk.Spotify(app_token, sender=sender)
    sender.close()