#NEWLINE# def set_user_property( self , name , value ) : #NEWLINE# #INDENT# url = ( ( 'https://wwws.mint.com/bundledServiceController.xevent?' + 'legacy=false&token=' ) + self . token ) #NEWLINE# req_id = str ( self . request_id ) #NEWLINE# self . request_id += 1 #NEWLINE# result = self . post ( url , data = { #NEWLINE# #INDENT# 'input' : json . dumps ( [ { #NEWLINE# #INDENT# 'args' : { #NEWLINE# #INDENT# 'propertyName' : name , #NEWLINE# 'propertyValue' : value , #NEWLINE# #UNINDENT# } , #NEWLINE# 'service' : 'MintUserService' , #NEWLINE# 'task' : 'setUserProperty' , #NEWLINE# 'id' : req_id , #NEWLINE# #UNINDENT# } ] ) , #NEWLINE# #UNINDENT# } , headers = self . json_headers ) #NEWLINE# if ( result . status_code != 200 ) : #NEWLINE# #INDENT# raise Exception ( ( 'Received HTTP error %d' % result . status_code ) ) #NEWLINE# #UNINDENT# response = result . text #NEWLINE# if ( req_id not in response ) : #NEWLINE# #INDENT# raise Exception ( 'Could not parse response to set_user_property' )