def __check_api_verion(self, value): try: response = ApiVersion(self.config, value).request() except RequestException as err: raise ValueError(str(err)) if not Api.is_minimum_version(response): raise ValueError( f"Your wallabag instance is too old. \ You need at least version \ {MINIMUM_API_VERSION}.")
def _run(self): if not self.config.is_valid(): return False, "The config is missing or incomplete." try: response = ApiVersion(self.config).request() except RequestException: return False, "The server or the API is not reachable." if not Api.is_minimum_version(response): return False, "The version of the wallabag instance is too old." ApiToken(self.config).request() return True, "The config is suitable."
def __init__(self, config, anno_id): Api.__init__(self, config) self.anno_id = anno_id
def __init__(self, config, url): Api.__init__(self, config) self.url = url
def __init__(self, config, entry_id, tag): Api.__init__(self, config) self.entry_id = entry_id self.tag = tag
def __init__(self, config, entry_id): Api.__init__(self, config) self.entry_id = entry_id
def __init__(self, config): Api.__init__(self, config) self.skip_auth = True
def __init__(self, config, tag_id): Api.__init__(self, config) self.tag_id = tag_id
def __init__(self, config, tags): Api.__init__(self, config) self.tags = tags
def __init__(self, config, custom_url=None): Api.__init__(self, config) self.custom_url = custom_url self.skip_auth = True
def __init__(self, config, params): Api.__init__(self, config) self.params = params
def __init__(self, config, url, params): Api.__init__(self, config) self.url = url self.params = params
def __init__(self, config, entry_id, format): Api.__init__(self, config) self.entry_id = entry_id self.format = format
def __init__(self, config): Api.__init__(self, config)
def __init__(self, config, entry_id, params): Api.__init__(self, config) self.entry_id = entry_id self.params = params