#NEWLINE# def to_dict( self , details = False , inquirer = None ) : #NEWLINE# #INDENT# output = { #NEWLINE# #INDENT# 'id' : self . id , #NEWLINE# 'username' : self . username , #NEWLINE# 'avatar' : self . avatar_url , #NEWLINE# 'on' : 'gratipay' , #NEWLINE# #UNINDENT# } #NEWLINE# if ( not details ) : #NEWLINE# #INDENT# return output #NEWLINE# #UNINDENT# output [ 'taking' ] = str ( self . taking ) #NEWLINE# output [ 'ntaking_from' ] = self . ntaking_from #NEWLINE# if self . anonymous_giving : #NEWLINE# #INDENT# giving = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# giving = str ( self . giving ) #NEWLINE# #UNINDENT# output [ 'giving' ] = giving #NEWLINE# output [ 'ngiving_to' ] = self . ngiving_to #NEWLINE# accounts = self . get_accounts_elsewhere ( ) #NEWLINE# elsewhere = output [ 'elsewhere' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( platform , account ) in accounts . items ( ) : #NEWLINE# #INDENT# fields = [ 'id' , 'user_id' , 'user_name' ] #NEWLINE# elsewhere [ platform ] = { k : getattr ( account , k , None ) for k in fields } #NEWLINE# #UNINDENT# output [ 'cryptocoins' ] = self . get_cryptocoin_addresses ( ) #NEWLINE# return output