Created Legacy API (markdown)

Ajay Ramachandran
2020-04-22 14:53:45 -04:00
parent cb9565f330
commit f006c45315

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