/// <summary> /// Test MAL Creditionals against MAL /// </summary> /// <returns></returns> private object TestMAL() { if (Providers.MyAnimeList.MALHelper.VerifyCredentials()) { return(APIStatus.statusOK()); } else { return(APIStatus.unauthorized()); } }
/// <summary> /// Create AuthToken and RefreshToken from PIN /// </summary> /// <returns></returns> private object CreateTrakt() { if (Providers.TraktTV.TraktTVHelper.EnterTraktPIN(ServerSettings.Trakt_PIN) == "Success") { return(APIStatus.statusOK()); } else { return(APIStatus.unauthorized()); } }
/// <summary> /// Test AniDB Creditentials /// </summary> /// <returns></returns> private object TestAniDB() { JMMService.AnidbProcessor.ForceLogout(); JMMService.AnidbProcessor.CloseConnections(); Thread.Sleep(1000); Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(ServerSettings.Culture); JMMService.AnidbProcessor.Init(ServerSettings.AniDB_Username, ServerSettings.AniDB_Password, ServerSettings.AniDB_ServerAddress, ServerSettings.AniDB_ServerPort, ServerSettings.AniDB_ClientPort); if (JMMService.AnidbProcessor.Login()) { JMMService.AnidbProcessor.ForceLogout(); return(APIStatus.statusOK()); } else { return(APIStatus.unauthorized()); } }