From f006c45315505f152982b6a18876b244f981cddf Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 22 Apr 2020 14:53:45 -0400 Subject: [PATCH] Created Legacy API (markdown) --- Legacy-API.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Legacy-API.md 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