<s> """<STR_LIT>""" <EOL> from xml . dom import minidom <EOL> from social . backends . oauth import BaseOAuth1 <EOL> class TripItOAuth ( BaseOAuth1 ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> AUTHORIZATION_URL = '<STR_LIT>' <EOL> REQUEST_TOKEN_URL = '<STR_LIT>' <EOL> ACCESS_TOKEN_URL = '<STR_LIT>' <EOL> EXTRA_DATA = [ ( '<STR_LIT>' , '<STR_LIT>' ) ] <EOL> def get_user_details ( self , response ) : <EOL> """<STR_LIT>""" <EOL> fullname , first_name , last_name = self . get_user_names ( response [ '<STR_LIT:name>' ] ) <EOL> return { '<STR_LIT:username>' : response [ '<STR_LIT>' ] , <EOL> '<STR_LIT:email>' : response [ '<STR_LIT:email>' ] , <EOL> '<STR_LIT>' : fullname , <EOL> '<STR_LIT>' : first_name , <EOL> '<STR_LIT>' : last_name } <EOL> def user_data ( self , access_token , * args , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> dom = minidom . parseString ( self . oauth_request ( <EOL> access_token , <EOL> '<STR_LIT>' <EOL> ) . content ) <EOL> return { <EOL> '<STR_LIT:id>' : dom . getElementsByTagName ( '<STR_LIT>' ) [ <NUM_LIT:0> ] . getAttribute ( '<STR_LIT>' ) , <EOL> '<STR_LIT:name>' : dom . getElementsByTagName ( '<STR_LIT>' ) [ <NUM_LIT:0> ] <EOL> . childNodes [ <NUM_LIT:0> ] . data , <EOL> '<STR_LIT>' : dom . getElementsByTagName ( '<STR_LIT>' ) [ <NUM_LIT:0> ] <EOL> . childNodes [ <NUM_LIT:0> ] . data , <EOL> '<STR_LIT:email>' : dom . getElementsByTagName ( '<STR_LIT>' ) [ <NUM_LIT:0> ] <EOL> . parentNode <EOL> . getElementsByTagName ( '<STR_LIT:address>' ) [ <NUM_LIT:0> ] <EOL> . childNodes [ <NUM_LIT:0> ] . data <EOL> } </s>
