Change api order

Ajay Ramachandran
2021-07-04 14:25:28 -04:00
parent ad400daea2
commit 51eb5f32b8

@@ -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):