diff --git a/API-Docs.md b/API-Docs.md index 52d722e..c20205f 100644 --- a/API-Docs.md +++ b/API-Docs.md @@ -47,6 +47,7 @@ ________________________________________________________________________________ **Error codes**: +400: Bad Request (Your inputs are wrong/impossible) 404: Not Found __________________________________________________________________ @@ -84,6 +85,7 @@ __________________________________________________________________ **Error codes**: +400: Bad Request (Your inputs are wrong/impossible) 404: Not Found __________________________________________________________________ @@ -461,6 +463,57 @@ __________________________________________________________________ 400: Bad Request (Your inputs are wrong/impossible) or exceed the character limits +404: Not Found +________________________________________________________________________________ + +##### **GET** `/api/lockCategories` + +**Input** (URL Parameters): +```js +{ + videoID: string +} +``` + +**Response**: +```js +{ + "categories": string[] + // See https://github.com/ajayyy/SponsorBlock/wiki/Types#category +} +``` + +**Error codes**: + +400: Bad Request (Your inputs are wrong/impossible) +404: Not Found + +__________________________________________________________________ + +##### **GET** `/api/lockCategories/:sha256HashPrefix` + +`sha256HashPrefix` is a hash of the YouTube `videoID`. It should be the first 4 - 32 characters (4 is recommended). This provides extra privacy by potentially finding more than just the video you are looking for. This makes the server not know exactly what video you are looking for. + +**Input** (URL Parameters): +```js +{ + "prefix": sha256HashPrefix // optional if not sent through path +} +``` + +**Response**: +```js +[{ // Array of this object + "videoID": string, + "hash": string, // The full hash + "categories": string[] + // See https://github.com/ajayyy/SponsorBlock/wiki/Types#category +}] +``` + +**Error codes**: + +400: Bad Request (Your inputs are wrong/impossible) 404: Not Found __________________________________________________________________