mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-19 05:58:37 +03:00
Created Legacy API (markdown)
53
Legacy-API.md
Normal file
53
Legacy-API.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
These API endpoints are deprecated but still function. See the full API document at https://github.com/ajayyy/SponsorBlock/wiki/API-Docs/
|
||||||
|
|
||||||
|
________________________________________________________________________________
|
||||||
|
|
||||||
|
**GET** `/api/getVideoSponsorTimes`
|
||||||
|
|
||||||
|
**Input**:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
videoID: string
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Response**:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
sponsorTimes: array [float],
|
||||||
|
UUIDs: array [string] //The ID for this sponsor time, used to submit votes
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Error codes**:
|
||||||
|
|
||||||
|
404: Not Found
|
||||||
|
|
||||||
|
__________________________________________________________________
|
||||||
|
|
||||||
|
**GET** or **POST** `/api/postVideoSponsorTimes`
|
||||||
|
|
||||||
|
**Input**:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
videoID: string,
|
||||||
|
startTime: float,
|
||||||
|
endTime: float,
|
||||||
|
userID: string //This should be a randomly generated UUID stored locally (not the public one)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Response**:
|
||||||
|
```
|
||||||
|
{
|
||||||
|
Nothing (status code 200)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**Error codes**:
|
||||||
|
|
||||||
|
400: Bad Request (Your inputs are wrong/impossible)
|
||||||
|
|
||||||
|
429: Rate Limit (Too many for the same user or IP)
|
||||||
|
|
||||||
|
409: Duplicate
|
||||||
Reference in New Issue
Block a user