initial commit

This commit is contained in:
Brahim Hadriche committed 2022-10-30 16:17:37 -04:00
commit 0eadc5da55
37 files changed
+1286

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
' TODO: remove Requests.brs and import it from installed package
import "pkg:/source/services/Requests.brs"
namespace RokuYoutube.Services.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)
url = `${API_URL}${SKIP_SEGMENT_ENDPOINT}?videoID=${videoId}${CATEGORIES}`
response = Requests().get(url)
if response.statuscode = 200
return response.json
end if
end function
end namespace