mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-17 13:08:54 +03:00
Updated API Docs (markdown)
21
API-Docs.md
21
API-Docs.md
@@ -23,9 +23,11 @@ ________________________________________________________________________________
|
|||||||
```
|
```
|
||||||
{
|
{
|
||||||
videoID: string,
|
videoID: string,
|
||||||
category: string, // Optional, defaults to "sponsor". See [the category list](https://raw.githubusercontent.com/ajayyy/SponsorBlock/master/config.json.example)
|
category: string, // Optional, defaults to "sponsor". See https://github.com/ajayyy/SponsorBlock/wiki/Types#category
|
||||||
|
|
||||||
categories: string[] // Optional. Use instead of "category" if you want multiple categories. Will look like ["sponsor","intro"]
|
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
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -34,7 +36,8 @@ ________________________________________________________________________________
|
|||||||
[{ // Array of this object
|
[{ // Array of this object
|
||||||
segment: float[], //[0, 15.23] start and end time in seconds
|
segment: float[], //[0, 15.23] start and end time in seconds
|
||||||
UUID: string,
|
UUID: string,
|
||||||
category: string
|
category: string,
|
||||||
|
videoDuration: float // Duration of video when submission occurred (coming soon, to be used to determine when a submission is out of date)
|
||||||
}]
|
}]
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -53,7 +56,10 @@ __________________________________________________________________
|
|||||||
startTime: float,
|
startTime: float,
|
||||||
endTime: float,
|
endTime: float,
|
||||||
category: string,
|
category: string,
|
||||||
userID: string //This should be a randomly generated UUID stored locally (not the public one)
|
userID: string, //This should be a randomly generated UUID stored locally (not the public one)
|
||||||
|
|
||||||
|
service: string, // Optional, default is 'YouTube'. See https://github.com/ajayyy/SponsorBlock/wiki/Types#service
|
||||||
|
videoDuration: float, // Optional, duration of video, will attempt to retrieve from the YouTube API if missing (to be used to determine when a submission is out of date)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -62,6 +68,8 @@ __________________________________________________________________
|
|||||||
{
|
{
|
||||||
videoID: string,
|
videoID: string,
|
||||||
userID: string, // This should be a randomly generated UUID stored locally (not the public one)
|
userID: string, // This should be a randomly generated UUID stored locally (not the public one)
|
||||||
|
service: string, // Optional, default is 'YouTube'. See https://github.com/ajayyy/SponsorBlock/wiki/Types#service
|
||||||
|
videoDuration: float, // Optional, duration of video, will attempt to retrieve from the YouTube API if missing (to be used to determine when a submission is out of date)
|
||||||
segments: [{ // Array of this object
|
segments: [{ // Array of this object
|
||||||
segment: float[], //[0, 15.23] start and end time in seconds
|
segment: float[], //[0, 15.23] start and end time in seconds
|
||||||
category: string
|
category: string
|
||||||
@@ -97,7 +105,10 @@ ________________________________________________________________________________
|
|||||||
{
|
{
|
||||||
category: string, // Optional, defaults to "sponsor". See [the category list](https://raw.githubusercontent.com/ajayyy/SponsorBlock/master/config.json.example)
|
category: string, // Optional, defaults to "sponsor". See [the category list](https://raw.githubusercontent.com/ajayyy/SponsorBlock/master/config.json.example)
|
||||||
|
|
||||||
categories: string[] // Use instead of "category" if you want multiple categories. Will look like ["sponsor","intro"]
|
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
|
||||||
|
videoDuration: float // Optional, duration of video, will attempt to retrieve from the YouTube API if missing (to be used to determine when a submission is out of date)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user