def __init__(self, auth_handler=None, host='api.t.sina.com.cn', search_host='api.t.sina.com.cn', cache=None, secure=False, api_root='', search_root='', retry_count=0, retry_delay=0, retry_errors=None, source=None, parser=None, log=None): self.auth = auth_handler self.host = host if source == None: if auth_handler != None: self.source = self.auth._consumer.key else: self.source = source self.search_host = search_host self.api_root = api_root self.search_root = search_root self.cache = cache self.secure = secure self.retry_count = retry_count self.retry_delay = retry_delay self.retry_errors = retry_errors self.parser = parser or ModelParser() self.log = log
def __init__(self, auth_handler=None, host='api.weibo.com', search_host='api.weibo.com', cache=None, secure=True, api_root='/2', search_root='/2', retry_count=0, retry_delay=0, retry_errors=None, source=None, parser=None, log=None): self.auth = auth_handler self.host = host self.source = source self.search_host = search_host self.api_root = api_root self.search_root = search_root self.cache = cache self.secure = secure self.retry_count = retry_count self.retry_delay = retry_delay self.retry_errors = retry_errors self.parser = parser or ModelParser() self.log = log
def __init__(self, auth_handler=None, host='api.twitter.com', search_host='search.twitter.com', cache=None, secure=False, api_root='/1', search_root='', retry_count=0, retry_delay=0, retry_errors=None, parser=None): self.auth = auth_handler self.host = host self.search_host = search_host self.api_root = api_root self.search_root = search_root self.cache = cache self.secure = secure self.retry_count = retry_count self.retry_delay = retry_delay self.retry_errors = retry_errors self.parser = parser or ModelParser()
def __init__(self, auth_handler=None, retry_count=0, host='open.t.qq.com', api_root='/api', cache=None, secure=False, retry_delay=0, retry_errors=None, source=None, parser=None, log=None): self.auth = auth_handler self.host = host self.api_root = api_root self.cache = cache self.secure = secure self.retry_count = retry_count self.retry_delay = retry_delay self.retry_errors = retry_errors self.parser = parser or ModelParser() self.log = log self._build_api_path()