#NEWLINE# def load_token_data( self , response = None ) : #NEWLINE# #INDENT# response = ( data or self . last_response ) #NEWLINE# if ( not response ) : #NEWLINE# #INDENT# raise ValueError ( 'No Response object form which to load data.' ) #NEWLINE# #UNINDENT# if ( response . status_code == 200 ) : #NEWLINE# #INDENT# data = json . loads ( response . content ) #NEWLINE# self . access_token_value = data . get ( 'access_token' ) #NEWLINE# self . access_token_lifetime = data . get ( 'expires_in' ) #NEWLINE# self . refresh_token_value = data . get ( 'refresh_token' ) #NEWLINE# return data #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . access_token_value = None #NEWLINE# self . access_token_lifetime = None #NEWLINE# self . refresh_token_value = None #NEWLINE# return None