Refactor project

This commit is contained in:
Brahim Hadriche committed 2022-11-18 13:04:20 -05:00
1 parent 9c1a2b987b
commit 2f2516eade
115 files changed
+12522

No files matched your search

+18
View File
@@ -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