def __init__(self, auth_handler=None,<EOL>host='<STR_LIT>', search_host='<STR_LIT>',<EOL>upload_host='<STR_LIT>', cache=None, api_root='<STR_LIT>',<EOL>search_root='<STR_LIT>', upload_root='<STR_LIT>', retry_count=<NUM_LIT:0>,<EOL>retry_delay=<NUM_LIT:0>, retry_errors=None, timeout=<NUM_LIT>, parser=None,<EOL>compression=False, wait_on_rate_limit=False,<EOL>wait_on_rate_limit_notify=False, proxy='<STR_LIT>'):
self.auth = auth_handler<EOL>self.host = host<EOL>self.search_host = search_host<EOL>self.upload_host = upload_host<EOL>self.api_root = api_root<EOL>self.search_root = search_root<EOL>self.upload_root = upload_root<EOL>self.cache = cache<EOL>self.compression = compression<EOL>self.retry_count = retry_count<EOL>self.retry_delay = retry_delay<EOL>self.retry_errors = retry_errors<EOL>self.timeout = timeout<EOL>self.wait_on_rate_limit = wait_on_rate_limit<EOL>self.wait_on_rate_limit_notify = wait_on_rate_limit_notify<EOL>self.parser = parser or ModelParser()<EOL>self.proxy = {}<EOL>if proxy:<EOL><INDENT>self.proxy['<STR_LIT>'] = proxy<EOL><DEDENT>parser_type = Parser<EOL>if not isinstance(self.parser, parser_type):<EOL><INDENT>raise TypeError(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(<EOL>required=parser_type.__name__,<EOL>actual=type(self.parser)<EOL>)<EOL>)<EOL><DEDENT>
Api instance Constructor

        :param auth_handler:
        :param host:  url of the server of the rest api, default:'api.twitter.com'
        :param search_host: url of the search server, default:'search.twitter.com'
        :param upload_host: url of the upload server, default:'upload.twitter.com'
        :param cache: Cache to query if a GET method is used, default:None
        :param api_root: suffix of the api version, default:'/1.1'
        :param search_root: suffix of the search version, default:''
        :param upload_root: suffix of the upload version, default:'/1.1'
        :param retry_count: number of allowed retries, default:0
        :param retry_delay: delay in second between retries, default:0
        :param retry_errors: default:None
        :param timeout: delay before to consider the request as timed out in seconds, default:60
        :param parser: ModelParser instance to parse the responses, default:None
        :param compression: If the response is compressed, default:False
        :param wait_on_rate_limit: If the api wait when it hits the rate limit, default:False
        :param wait_on_rate_limit_notify: If the api print a notification when the rate limit is hit, default:False
        :param proxy: Url to use as proxy during the HTTP request, default:''

        :raise TypeError: If the given parser is not a ModelParser instance.