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()
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()