<s> import json <EOL> from libsaas . services import base <EOL> from libsaas import http <EOL> from . import resource <EOL> class Fullcontact ( base . Resource ) : <EOL> def __init__ ( self , api_key ) : <EOL> """<STR_LIT>""" <EOL> self . apiroot = '<STR_LIT>' <EOL> self . api_key = api_key <EOL> self . add_filter ( self . use_json ) <EOL> self . add_filter ( self . add_api_key ) <EOL> def get_url ( self ) : <EOL> return self . apiroot <EOL> def add_api_key ( self , request ) : <EOL> request . params . update ( { '<STR_LIT>' : self . api_key } ) <EOL> def use_json ( self , request ) : <EOL> request . uri += '<STR_LIT>' <EOL> @ base . resource ( resource . Person ) <EOL> def person ( self , email = None , emailMD5 = None , phone = None , <EOL> twitter = None , facebookUsername = None ) : <EOL> """<STR_LIT>""" <EOL> kwargs = list ( <EOL> filter ( None , [ email , emailMD5 , phone , twitter , facebookUsername , ] ) ) <EOL> if len ( kwargs ) != <NUM_LIT:1> : <EOL> raise TypeError ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> return resource . Person ( self , email = email , emailMD5 = emailMD5 , phone = phone , <EOL> twitter = twitter , facebookUsername = facebookUsername ) <EOL> @ base . resource ( resource . Enhanced ) <EOL> def enhanced ( self , email ) : <EOL> """<STR_LIT>""" <EOL> return resource . Enhanced ( self , email ) <EOL> @ base . resource ( resource . Name ) <EOL> def names ( self ) : <EOL> """<STR_LIT>""" <EOL> return resource . Name ( self ) <EOL> @ base . resource ( resource . Location ) <EOL> def locations ( self ) : <EOL> """<STR_LIT>""" <EOL> return resource . Location ( self ) </s>
