Updated API Docs (markdown)

Ajay Ramachandran
2021-03-23 17:45:29 -04:00
parent 6095e519fd
commit a5996cd5e6

@@ -17,7 +17,7 @@ Slim Database Mirror (5 min update time, provided by Lartza): https://sb.ltn.fi/
<sub>[Database Dump](https://sponsor.ajay.app/database.db) | [Webhook Docs](https://github.com/ajayyy/SponsorBlock/wiki/Webhooks)</sub> <sub>[Database Dump](https://sponsor.ajay.app/database.db) | [Webhook Docs](https://github.com/ajayyy/SponsorBlock/wiki/Webhooks)</sub>
________________________________________________________________________________ ________________________________________________________________________________
**GET** `/api/skipSegments` ##### **GET** `/api/skipSegments`
**Input**: **Input**:
```js ```js
@@ -47,7 +47,7 @@ ________________________________________________________________________________
__________________________________________________________________ __________________________________________________________________
**POST** `/api/skipSegments` ##### **POST** `/api/skipSegments`
**Input Option 1 (URL Parameters)**: **Input Option 1 (URL Parameters)**:
```js ```js
@@ -96,7 +96,7 @@ __________________________________________________________________
________________________________________________________________________________ ________________________________________________________________________________
**GET** `/api/skipSegments/:sha256HashPrefix` ##### **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. `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.
@@ -131,7 +131,7 @@ ________________________________________________________________________________
404: Not Found 404: Not Found
__________________________________________________________________ __________________________________________________________________
**POST** <sup>or **GET** (legacy)</sup> `/api/voteOnSponsorTime` ##### **POST** <sup>or ##### **GET** (legacy)</sup> `/api/voteOnSponsorTime`
**Input: Normal Vote** (URL Parameters): **Input: Normal Vote** (URL Parameters):
```js ```js
@@ -168,7 +168,7 @@ OR
__________________________________________________________________ __________________________________________________________________
**POST** <sup>or **GET** (legacy)</sup> `/api/viewedVideoSponsorTime` ##### **POST** <sup>or ##### **GET** (legacy)</sup> `/api/viewedVideoSponsorTime`
**Input** (URL Parameters): **Input** (URL Parameters):
```js ```js
@@ -190,7 +190,7 @@ __________________________________________________________________
__________________________________________________________________ __________________________________________________________________
**GET** `/api/getViewsForUser` ##### **GET** `/api/getViewsForUser`
**Input**: **Input**:
```js ```js
@@ -212,7 +212,7 @@ __________________________________________________________________
__________________________________________________________________ __________________________________________________________________
**GET** `/api/getSavedTimeForUser` ##### **GET** `/api/getSavedTimeForUser`
**Input**: **Input**:
```js ```js
@@ -234,7 +234,7 @@ __________________________________________________________________
__________________________________________________________________ __________________________________________________________________
**POST** `/api/setUsername` ##### **POST** `/api/setUsername`
**Input** (URL Parameters): **Input** (URL Parameters):
```js ```js
@@ -259,7 +259,7 @@ __________________________________________________________________
__________________________________________________________________ __________________________________________________________________
**GET** `/api/getUsername` ##### **GET** `/api/getUsername`
**Input**: **Input**:
```js ```js
@@ -283,7 +283,7 @@ __________________________________________________________________
### Stats Calls ### Stats Calls
**GET** `/api/getTopUsers` ##### **GET** `/api/getTopUsers`
**Input**: **Input**:
```js ```js
@@ -308,7 +308,7 @@ __________________________________________________________________
__________________________________________________________________ __________________________________________________________________
**GET** `/api/getTotalStats` ##### **GET** `/api/getTotalStats`
**Input**: **Input**:
```js ```js
@@ -334,7 +334,7 @@ __________________________________________________________________
None None
__________________________________________________________________ __________________________________________________________________
**GET** `/api/getDaysSavedFormatted` ##### **GET** `/api/getDaysSavedFormatted`
**Input**: **Input**:
```js ```js
@@ -359,7 +359,7 @@ __________________________________________________________________
These can only be called by the users added to the VIP table. These can only be called by the users added to the VIP table.
**GET** `/api/isUserVIP` ##### **GET** `/api/isUserVIP`
**Input**: **Input**:
```js ```js
@@ -382,7 +382,7 @@ These can only be called by the users added to the VIP table.
__________________________________________________________________ __________________________________________________________________
**POST** `/api/noSegments` ##### **POST** `/api/noSegments`
Will block new segment submissions of the specified category on that video. Will block new segment submissions of the specified category on that video.
@@ -410,7 +410,7 @@ Will block new segment submissions of the specified category on that video.
__________________________________________________________________ __________________________________________________________________
**POST** `/api/shadowBanUser` ##### **POST** `/api/shadowBanUser`
Shadow banned submissions are hidden for everyone but the IP that originally submitted it. Shadow banning a user shadow bans all future submissions. Shadow banned submissions are hidden for everyone but the IP that originally submitted it. Shadow banning a user shadow bans all future submissions.
@@ -438,7 +438,7 @@ Shadow banned submissions are hidden for everyone but the IP that originally sub
403: Unauthorized (You are not a VIP) 403: Unauthorized (You are not a VIP)
__________________________________________________________________ __________________________________________________________________
**POST** `/api/warnUser` ##### **POST** `/api/warnUser`
Temporary ban that shows a warning asking them to contact us. Temporary ban that shows a warning asking them to contact us.
@@ -468,7 +468,7 @@ __________________________________________________________________
These can only be called by the server administrator, set in the config. These can only be called by the server administrator, set in the config.
**POST** `/api/addUserAsVIP` ##### **POST** `/api/addUserAsVIP`
VIPs have extra privileges and their votes count more. VIPs have extra privileges and their votes count more.