Skip to content

Commit f10461f

Browse files
committed
Implement Database->deleteDoc()
Used to delete a document from a database.
1 parent e397328 commit f10461f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Database.php

+10
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,14 @@ public function putDoc($doc)
109109
]);
110110

111111
}
112+
113+
public function deleteDoc($doc_id)
114+
{
115+
$delete_doc_url = $this->docs_url . '/' . $doc_id;
116+
117+
$client = new Client();
118+
$res = $client->delete($delete_doc_url);
119+
120+
return json_decode((string) $res->getBody(), true);
121+
}
112122
}

0 commit comments

Comments
 (0)