Exemplo n.º 1
0
 def sound_cloud_petition_resolved(handler):
     """
     Getting back from redirection of SoundCloud and getting Access_Token
     :param code: Code extracted from the URL that SoundCloud Redirect (Default)
     """
     code = handler.get_argument('code')
     sound_cloud_client = Clients().sound_cloud_client()
     access_token = sound_cloud_client.exchange_token(code)
     current_user = sound_cloud_client.get('/me').username
     DANaix.initialize_client(current_user, access_token.access_token)
     return "ok"  # Improve messages. Change to Json