Refactor project
This commit is contained in:
1 parent
9c1a2b987b
commit
2f2516eade
115 files changed
+12522
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import "pkg:/source/roku_modules/rokurequests/Requests.brs"
|
||||
|
||||
namespace SponsorBlock
|
||||
const API_URL = "https://sponsor.ajay.app"
|
||||
const SKIP_SEGMENT_ENDPOINT = "/api/skipSegments"
|
||||
const CATEGORIES = "&category=sponsor&category=selfpromo&category=interaction&category=intro&category=outro&category=preview&category=music_offtopic"
|
||||
|
||||
function GetSkipSegmentsForVideo(videoId as string) as object
|
||||
url = `${SponsorBlock.API_URL}${SponsorBlock.SKIP_SEGMENT_ENDPOINT}?videoID=${videoId}${SponsorBlock.CATEGORIES}`
|
||||
response = Requests().get(url)
|
||||
|
||||
if response.statuscode = 200
|
||||
return response.json
|
||||
end if
|
||||
return invalid
|
||||
end function
|
||||
|
||||
end namespace
|
||||
Reference in new issue
Block a user