[re2o_lookup] Remove useless methods

certbot_on_virtu
_pollion 2020-04-25 23:23:34 +02:00
parent ce87098727
commit ca5646a52b
1 changed files with 0 additions and 47 deletions

View File

@ -302,53 +302,6 @@ class Client:
.format(endpoint))
return ret
def count(self, endpoint, params={}):
"""Counts all objects on the server that corresponds to the given
endpoint. The endpoint must be valid for listing objects.
:arg endpoint: The path of the endpoint.
:kwarg params: See `requests.get` params.
:returns: Number of objects on the server as returned by the API.
"""
display.v("Starting counting objects under '{}'"
.format(endpoint))
# For optimization, ask for only 1 result (so the server will take
# less time to process the request) unless the user is forcing
# a different `page_size`.
if 'page_size' not in params.keys():
display.vvv("Forcing 'page_size' parameter to '1'.")
params['page_size'] = 1
# Performs the request and return the `count` value in the response.
ret = self.get(
self.get_url_for(endpoint),
params=params,
)['count']
display.vvv("Counting objects under '{}' successful"
.format(endpoint))
return ret
def view(self, endpoint, params={}):
"""Retrieves the details of an object from the server that corresponds
to the given endpoint.
:args endpoint: The path of the endpoint.
:kwargs params: See `requests.get` params.
:returns: The object serialized as returned by the API.
"""
display.v("Starting viewing an object under '{}'"
.format(endpoint))
ret = self.get(
self.get_url_for(endpoint),
params=params
)
display.vvv("Viewing object under '{}' successful"
.format(endpoint))
return ret
class LookupModule(LookupBase):
"""