import "InvidiousService.bs" function Init() m.top.apiDefinitions = ParseJson(ReadAsciiFile("libpkg:/config/invidious_video_api.yaml")) m.service = new Invidious.InvidiousService(m.top) m.top.authToken = m.service.GetAuthToken() end function function GetCurrentInstance(unused as dynamic) as string return m.service.GetInstance() end function function GetAuthorizeTokenLink(unused as dynamic) as dynamic return m.service.GetAuthorizeTokenLink() end function function SetAuthToken(token as string, instance as string, username as dynamic) m.service.SetAuthToken(token, instance, username) end function