def get(self, resource_id=None, params=None):
        """
        Get all records for a resource, or a single resource record.

        Optional Arguments:

            resource_id
                The resource id (may also be a label in some environments).

            params
                Additional request parameters to pass along.

        """
        if params is None:
            params = {} # pragma: no cover
        if resource_id:
            path = '/%s/%s' % (self.path, resource_id)
        else:
            path = '/%s' % self.path

        try:
            response = self.api.make_request('GET', path,
                                             params=self.filter(params))
        except exc.dRestRequestError as e:
            msg = "%s (resource: %s, id: %s)" % (e.msg, self.name,
                                                 resource_id)
            raise exc.dRestRequestError(msg, e.response)

        return response
dataset/ETHPy150Open datafolklabs/drest/drest/resource.py/RESTResourceHandler.get/original