def _list_request(self, resource, permanent=False, **kwargs):
"""Get the list of objects of the specified type.
:param resource: The name of the REST resource, e.g., 'audits'.
"param **kw: Parameters for the request.
:return: A tuple with the server response and deserialized JSON list
of objects
"""
uri = self._get_uri(resource, permanent=permanent)
if kwargs:
uri += "?%s" % urlparse.urlencode(kwargs)
resp, body = self.get(uri)
self.expected_success(200, int(resp['status']))
return resp, self.deserialize(body)
评论列表
文章目录