Commit d9a40571 authored by Stefan Karner's avatar Stefan Karner

Remove dead code, fix docstrings, fix identifiers

parent 3af3760b
......@@ -123,7 +123,6 @@ class WebarchivSession:
elif r.status_code == 410:
print('The requested API Version (via X-API-VERSION Header) is not available', file=sys.stderr)
return r
raise HTTPError(response=r)
def fulltext_search(self, query_string, from_=None, to_=None):
"""
......@@ -195,15 +194,17 @@ class WebarchivSession:
"""
this is the pollingrequest for the given typen of request
:param response: String to search for
:param resp: String to search for
:return: response
"""
requestid = resp.json()['requestid']
type = resp.json()['type']
if type == 1:
type_ = resp.json()['type']
if type_ == 1:
r = self._get(op='/search/status/fulltext', params={'requestid': requestid})
elif type == 2:
elif type_ == 2:
r = self._get(op='/search/status/wayback', params={'requestid': requestid})
else:
raise NotImplementedError(f'Unknown status query type {type_} - Please update client.')
return r
......@@ -235,8 +236,6 @@ class WebarchivSession:
Start a domain name search in the Webarchive.
:param query_string: String to search for
:param page_: The page number parameter works with the page size parameter to control the offset of the records returned in the results. Default value is 1
:param pagesize_: The page size parameter works with the page number parameter to control the offset of the records returned in the results. It also controls how many results are returned with each request. Default value is 10
:return: result as json
"""
params = {'q': query_string}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment