class Data:
    def __init__(self, client):
        self.client = client

    def list_clusters(self):
        return self.client.request("GET", "/clusters")

    def query(self, collection, query=None):
        return self.client.request("GET", f"/v1/data/{collection}", params=query)

    def insert(self, collection, document):
        return self.client.request("POST", f"/v1/data/{collection}", json=document)

    def update(self, collection, document_id, update_data):
        return self.client.request("PUT", f"/v1/data/{collection}/{document_id}", json=update_data)

    def delete(self, collection, document_id):
        return self.client.request("DELETE", f"/v1/data/{collection}/{document_id}")
