diff --git a/Legacy-API.md b/Legacy-API.md new file mode 100644 index 0000000..e761aae --- /dev/null +++ b/Legacy-API.md @@ -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 \ No newline at end of file