def __init__(self, api_url, cookie_file=None, user_agent=DEFAULT_UA):
self._api_url = api_url
def __init__(self, api_url, cookie_file=None, user_agent=DEFAULT_UA):
self._api_url = api_url
self._opener.addheaders = [('User-agent', user_agent)]
def _fetch_http(self, url, params):
self._opener.addheaders = [('User-agent', user_agent)]
def _fetch_http(self, url, params):
return True
elif result['login']['result'] == 'NeedToken' and not token:
return self.login(user, passwd, result['login']['token'])
else:
return False
return True
elif result['login']['result'] == 'NeedToken' and not token:
return self.login(user, passwd, result['login']['token'])
else:
return False
def limits(self, low, high):
"""
Convenience function for determining appropriate limits in the API. If
def limits(self, low, high):
"""
Convenience function for determining appropriate limits in the API. If