def __init__(self, url: str, scroll_url: str | None = None, es_query: str | None = None, es_filter: str | None = None, es_fields: str | None = None, es_size: int = 5000, es_scroll: str = '1m', fetch_timeout: int = 5, fetch_delay: int | None = None): self._url = url self._scroll_url = scroll_url self._scroll = es_scroll self._request_data = {} if es_fields: self._request_data['fields'] = es_fields if es_query: self._request_data['query'] = es_query if es_filter: self._request_data['filter'] = es_filter if es_size: self._request_data['size'] = es_size self._do_http = PoliteHTTP(timeout=fetch_timeout, delay=fetch_delay)
def __init__(self, url, scroll_url=None, es_query=None, es_filter=None, es_fields=None, es_size=5000, es_scroll='1m', fetch_timeout=5, fetch_delay=None): self.url = url self.scroll_url = scroll_url self.scroll = es_scroll self.request_data = {} if es_fields: self.request_data['fields'] = es_fields if es_query: self.request_data['query'] = es_query if es_filter: self.request_data['filter'] = es_filter if es_size: self.request_data['size'] = es_size self.do_http = PoliteHTTP(timeout=fetch_timeout, delay=fetch_delay)
def __init__(self, url: str, fetch_timeout: int = 5, fetch_delay: Optional[int] = None, max_api_url_length: int = 4443) -> None: self.url = url self.do_http = PoliteHTTP(timeout=fetch_timeout, delay=fetch_delay) self.max_api_url_length = max_api_url_length # see https://wiki.archlinux.org/index.php/Aurweb_RPC_interface#Limitations
def __init__(self, url: str, per_page: int = 100, fetch_timeout: int = 5, fetch_delay: int | None = None): self.url = url self.per_page = per_page self.do_http = PoliteHTTP(timeout=fetch_timeout, delay=fetch_delay)
def __init__(self, url, fetch_timeout=5, fetch_delay=None): self.url = url self.do_http = PoliteHTTP(timeout=fetch_timeout, delay=fetch_delay)
def __init__(self, url: str, fetch_timeout: int = 5, fetch_delay: Optional[int] = None) -> None: self.url = url self.do_http = PoliteHTTP(timeout=fetch_timeout, delay=fetch_delay)