mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-15 07:57:09 +03:00
Changes by blabdude - - added 400 to /api/skipSegments - added lockCategories (GET has prefix in param but up to you if you want to keep it)
53
API-Docs.md
53
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
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
Reference in New Issue
Block a user