From 51eb5f32b8aedebeca595bfc77d4820c7af71b4c Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Sun, 4 Jul 2021 14:25:28 -0400 Subject: [PATCH] Change api order --- API-Docs.md | 70 ++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/API-Docs.md b/API-Docs.md index 55780af..fb49131 100644 --- a/API-Docs.md +++ b/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):