From ee99adffed4190efbe7278ee0e9c7801463fd228 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Fri, 11 Aug 2023 18:53:30 -0700 Subject: [PATCH] Document diff API --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 9d0389a..1dd4ebe 100755 --- a/README.md +++ b/README.md @@ -223,6 +223,15 @@ From there, you can use `GET` and `HEAD` requests with allt he same headers and Note that you cannot `PUT` or `DELETE` data in a versioned folder. +### `fetch('hyper://NAME/$/diff/OLD_VERSION..NEW_VERSION/folder/')` + +You can get a recursive diff of the changes inside a folder between +two version of a hyperdrive by sending a `GET` request to paths inside +the special `/$/diff` folder. `OLD_VERSION` and `NEW_VERSION` should +be numbers representing the versions to compare. + +Response body is the JSON object returned by +[`drive.diff`](https://docs.holepunch.to/building-blocks/hyperdrive#const-stream-drive.diff-version-folder-options). ## Limitations: