Skip to content

Commit

Permalink
Document diff API
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmturner committed Aug 12, 2023
1 parent 41590be commit ee99adf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit ee99adf

Please sign in to comment.