Changes by blabdude - formatting/ spacing fixes - 409 on warnUser - <30 character userID warning at bottom

Ajay Ramachandran
2021-07-31 22:02:12 -04:00
parent b225cf1d15
commit 207651a5c2

@@ -50,7 +50,6 @@ ________________________________________________________________________________
400: Bad Request (Your inputs are wrong/impossible)
404: Not Found
__________________________________________________________________
##### **GET** `/api/skipSegments/:sha256HashPrefix`
@@ -80,7 +79,6 @@ __________________________________________________________________
UUID: string,
category: string
}]
}]
```
@@ -141,7 +139,6 @@ __________________________________________________________________
429: Rate Limit (Too many for the same user or IP)
409: Duplicate
________________________________________________________________________________
##### **POST** `/api/voteOnSponsorTime`
@@ -178,7 +175,6 @@ OR
400: Bad Request (Your inputs are wrong/impossible)
403: Reason given in request (moderation)
__________________________________________________________________
##### **POST** `/api/viewedVideoSponsorTime`
@@ -200,7 +196,6 @@ __________________________________________________________________
**Error codes**:
400: Bad Request (Your inputs are wrong/impossible)
__________________________________________________________________
##### **GET** `/api/userInfo`
@@ -238,7 +233,6 @@ __________________________________________________________________
**Error codes**:
400: Bad inputs
__________________________________________________________________
##### **GET** `/api/getViewsForUser`
@@ -260,7 +254,6 @@ __________________________________________________________________
**Error codes**:
404: Not Found
__________________________________________________________________
##### **GET** `/api/getSavedTimeForUser`
@@ -282,7 +275,6 @@ __________________________________________________________________
**Error codes**:
404: Not Found
__________________________________________________________________
##### **POST** `/api/setUsername`
@@ -307,7 +299,6 @@ __________________________________________________________________
**Error codes**:
400: Bad Request (Your inputs are wrong/impossible)
__________________________________________________________________
##### **GET** `/api/getUsername`
@@ -329,7 +320,6 @@ __________________________________________________________________
**Error codes**:
400: Bad Request (Your inputs are wrong/impossible)
__________________________________________________________________
### Stats Calls
@@ -356,7 +346,6 @@ __________________________________________________________________
**Error codes**:
400: Bad Request (Your inputs are wrong/impossible)
__________________________________________________________________
##### **GET** `/api/getTotalStats`
@@ -442,7 +431,6 @@ __________________________________________________________________
400: Bad Request (Your inputs are wrong/impossible)
404: Not Found
__________________________________________________________________
##### **GET** `/api/userID`
@@ -493,8 +481,8 @@ ________________________________________________________________________________
**Error codes**:
400: Bad Request (Your inputs are wrong/impossible)
404: Not Found
404: Not Found
__________________________________________________________________
##### **GET** `/api/lockCategories/:sha256HashPrefix`
@@ -511,10 +499,10 @@ __________________________________________________________________
**Response**:
```js
[{ // Array of this object
"videoID": string,
"hash": string, // The full hash
"categories": string[],
// See https://github.com/ajayyy/SponsorBlock/wiki/Types#category
"videoID": string,
"hash": string, // The full hash
"categories": string[],
// See https://github.com/ajayyy/SponsorBlock/wiki/Types#category
"reason": string
}]
```
@@ -522,8 +510,8 @@ __________________________________________________________________
**Error codes**:
400: Bad Request (Your inputs are wrong/impossible)
404: Not Found
404: Not Found
__________________________________________________________________
### VIP Calls
@@ -550,7 +538,6 @@ These can only be called by the users added to the VIP table.
**Error codes**:
400: Bad Request (Your inputs are wrong/impossible)
__________________________________________________________________
##### **POST** `/api/lockCategories` (`/api/noSegments` deprecated)
@@ -579,7 +566,6 @@ Will block new segment submissions of the specified category on that video.
400: Bad Request (Your inputs are wrong/impossible)
403: Unauthorized (You are not a VIP)
__________________________________________________________________
##### **DELETE** `/api/lockCategories` (`/api/noSegments` deprecated)
@@ -607,7 +593,6 @@ Will block new segment submissions of the specified category on that video.
400: Bad Request (Your inputs are wrong/impossible)
403: Unauthorized (You are not a VIP)
__________________________________________________________________
##### **POST** `/api/shadowBanUser`
@@ -664,6 +649,7 @@ Temporary ban that shows a warning asking them to contact us.
403: Unauthorized (You are not a VIP)
409: User already warned
__________________________________________________________________
##### **POST** `/api/clearCache`
@@ -690,7 +676,6 @@ Clear redis cache for video.
400: Bad Request (Your inputs are wrong/impossible)
403: Unauthorized (You are not a VIP)
__________________________________________________________________
##### **POST** `/api/purgeAllSegments`
@@ -756,4 +741,6 @@ https://github.com/ajayyy/SponsorBlock/wiki/Legacy-API
### Local userID vs Public userID
The local userID should be a randomly generated and saved client side and should be 32 characters (or more). It is used to submit and vote. The public userID is what is used as an identifier in the database. This is the local userID with a SHA 256 hash 5000 times.
The local userID should be a randomly generated and saved client side and should be 32 characters (or more). It is used to submit and vote. The public userID is what is used as an identifier in the database. This is the local userID with a SHA 256 hash 5000 times.
If your local userID is less than 30 characters long, you will get an error on submission or voting. Use a longer random string, 36 characters or more is recommended.