mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-15 07:57:09 +03:00
Change api order
70
API-Docs.md
70
API-Docs.md
@@ -50,6 +50,41 @@ ________________________________________________________________________________
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
##### **GET** `/api/skipSegments/: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
|
||||
{
|
||||
category: string, // Optional, defaults to "sponsor", can be repeated for multiple categories.
|
||||
// See https://github.com/ajayyy/SponsorBlock/wiki/Types#category
|
||||
|
||||
categories: string[], // Optional, use this instead of "category" if you want multiple categories. Will look like ["sponsor","intro"]
|
||||
|
||||
service: string // Optional, default is 'YouTube'. See https://github.com/ajayyy/SponsorBlock/wiki/Types#service
|
||||
}
|
||||
```
|
||||
|
||||
**Response**:
|
||||
```js
|
||||
[{ // Array of this object
|
||||
"videoID": string,
|
||||
"hash": string, // The full hash
|
||||
"segments": [{ // Array of this object
|
||||
segment: float[], //[0, 15.23] start and end time in seconds
|
||||
UUID: string,
|
||||
category: string
|
||||
}]
|
||||
|
||||
}]
|
||||
```
|
||||
|
||||
**Error codes**:
|
||||
|
||||
404: Not Found
|
||||
__________________________________________________________________
|
||||
|
||||
##### **POST** `/api/skipSegments`
|
||||
|
||||
**Input Option 1 (URL Parameters)**:
|
||||
@@ -99,41 +134,6 @@ __________________________________________________________________
|
||||
|
||||
________________________________________________________________________________
|
||||
|
||||
##### **GET** `/api/skipSegments/: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
|
||||
{
|
||||
category: string, // Optional, defaults to "sponsor", can be repeated for multiple categories.
|
||||
// See https://github.com/ajayyy/SponsorBlock/wiki/Types#category
|
||||
|
||||
categories: string[], // Optional, use this instead of "category" if you want multiple categories. Will look like ["sponsor","intro"]
|
||||
|
||||
service: string // Optional, default is 'YouTube'. See https://github.com/ajayyy/SponsorBlock/wiki/Types#service
|
||||
}
|
||||
```
|
||||
|
||||
**Response**:
|
||||
```js
|
||||
[{ // Array of this object
|
||||
"videoID": string,
|
||||
"hash": string, // The full hash
|
||||
"segments": [{ // Array of this object
|
||||
segment: float[], //[0, 15.23] start and end time in seconds
|
||||
UUID: string,
|
||||
category: string
|
||||
}]
|
||||
|
||||
}]
|
||||
```
|
||||
|
||||
**Error codes**:
|
||||
|
||||
404: Not Found
|
||||
__________________________________________________________________
|
||||
|
||||
##### **POST** `/api/voteOnSponsorTime`
|
||||
|
||||
**Input: Normal Vote** (URL Parameters):
|
||||
|
||||
Reference in New Issue
Block a user