Delete a resource.

        :param pid: The HydroShare ID of the resource

def deleteResource(self, pid):
        """
        Delete a resource.

        :param pid: The HydroShare ID of the resource
        """
        url = "{url_base}/resource/{pid}/".format(url_base=self.url_base,
                                                  pid=pid)

        r = self._request('DELETE', url)
        if r.status_code != 200:
            if r.status_code == 403:
                raise HydroShareNotAuthorized(('DELETE', url))
            elif r.status_code == 404:
                raise HydroShareNotFound((pid,))
            else:
                raise HydroShareHTTPException((url, 'DELETE', r.status_code))

        resource = r.json()
        assert(resource['resource_id'] == pid)
        return resource['resource_id']