public DiscordNotification(IDiscordApi api, ISettingsService <DiscordNotificationSettings> sn, ILogger <DiscordNotification> log, INotificationTemplatesRepository r, IMovieRequestRepository m, ITvRequestRepository t, ISettingsService <CustomizationSettings> s) : base(sn, r, m, t, s, log) { Api = api; Logger = log; }
/// <summary> /// MonoBehaviour method called on GameObject by Unity during initialization phase. /// </summary> void Start() { DepenencyInjector.SetupInjection(); this.SetUserName(); discordApi = DepenencyInjector.Resolve <IDiscordApi>(); progressLabel.SetActive(false); controlPanel.SetActive(true); }
public DiscordNotification(IDiscordApi api, ISettingsService <DiscordNotificationSettings> sn, ILogger <DiscordNotification> log, INotificationTemplatesRepository r, IMovieRequestRepository m, ITvRequestRepository t, ISettingsService <CustomizationSettings> s, IRepository <RequestSubscription> sub, IMusicRequestRepository music, IRepository <UserNotificationPreferences> userPref) : base(sn, r, m, t, s, log, sub, music, userPref) { Api = api; Logger = log; }
public AdminModule(ISettingsService <PlexRequestSettings> prService, ISettingsService <CouchPotatoSettings> cpService, ISettingsService <AuthenticationSettings> auth, ISettingsService <PlexSettings> plex, ISettingsService <SonarrSettings> sonarr, ISettingsService <SickRageSettings> sickrage, ISonarrApi sonarrApi, ISettingsService <EmailNotificationSettings> email, IPlexApi plexApi, ISettingsService <PushbulletNotificationSettings> pbSettings, PushbulletApi pbApi, ICouchPotatoApi cpApi, ISettingsService <PushoverNotificationSettings> pushoverSettings, ISettingsService <NewletterSettings> newsletter, IPushoverApi pushoverApi, IRepository <LogEntity> logsRepo, INotificationService notify, ISettingsService <HeadphonesSettings> headphones, ISettingsService <LogSettings> logs, ICacheProvider cache, ISettingsService <SlackNotificationSettings> slackSettings, ISlackApi slackApi, ISettingsService <LandingPageSettings> lp, ISettingsService <ScheduledJobsSettings> scheduler, IJobRecord rec, IAnalytics analytics, ISettingsService <NotificationSettingsV2> notifyService, IRecentlyAdded recentlyAdded, ISettingsService <WatcherSettings> watcherSettings, ISettingsService <DiscordNotificationSettings> discord, IDiscordApi discordapi, ISettingsService <RadarrSettings> settings, IRadarrApi radarrApi , ISecurityExtensions security) : base("admin", prService, security) { PrService = prService; CpService = cpService; AuthService = auth; PlexService = plex; SonarrService = sonarr; SonarrApi = sonarrApi; EmailService = email; PlexApi = plexApi; PushbulletService = pbSettings; PushbulletApi = pbApi; CpApi = cpApi; SickRageService = sickrage; LogsRepo = logsRepo; PushoverService = pushoverSettings; PushoverApi = pushoverApi; NotificationService = notify; HeadphonesService = headphones; NewsLetterService = newsletter; LogService = logs; Cache = cache; SlackSettings = slackSettings; SlackApi = slackApi; LandingSettings = lp; ScheduledJobSettings = scheduler; JobRecorder = rec; Analytics = analytics; NotifySettings = notifyService; RecentlyAdded = recentlyAdded; WatcherSettings = watcherSettings; DiscordSettings = discord; DiscordApi = discordapi; RadarrSettings = settings; RadarrApi = radarrApi; Before += (ctx) => Security.AdminLoginRedirect(Permissions.Administrator, ctx); Get["/"] = _ => Admin(); Get["/authentication", true] = async(x, ct) => await Authentication(); Post["/authentication", true] = async(x, ct) => await SaveAuthentication(); Post["/", true] = async(x, ct) => await SaveAdmin(); Post["/requestauth"] = _ => RequestAuthToken(); Get["/getusers"] = _ => GetUsers(); Get["/couchpotato"] = _ => CouchPotato(); Post["/couchpotato", true] = async(x, ct) => await SaveCouchPotato(); Get["/plex"] = _ => Plex(); Post["/plex", true] = async(x, ct) => await SavePlex(); Get["/sonarr"] = _ => Sonarr(); Post["/sonarr"] = _ => SaveSonarr(); Post["/sonarrprofiles"] = _ => GetSonarrQualityProfiles(); Get["/sickrage"] = _ => Sickrage(); Post["/sickrage"] = _ => SaveSickrage(); Post["/cpprofiles", true] = async(x, ct) => await GetCpProfiles(); Post["/cpapikey"] = x => GetCpApiKey(); Get["/emailnotification"] = _ => EmailNotifications(); Post["/emailnotification"] = _ => SaveEmailNotifications(); Post["/testemailnotification", true] = async(x, ct) => await TestEmailNotifications(); Get["/pushbulletnotification"] = _ => PushbulletNotifications(); Post["/pushbulletnotification"] = _ => SavePushbulletNotifications(); Post["/testpushbulletnotification", true] = async(x, ct) => await TestPushbulletNotifications(); Get["/pushovernotification"] = _ => PushoverNotifications(); Post["/pushovernotification"] = _ => SavePushoverNotifications(); Post["/testpushovernotification", true] = async(x, ct) => await TestPushoverNotifications(); Get["/logs"] = _ => Logs(); Get["/loglevel"] = _ => GetLogLevels(); Post["/loglevel"] = _ => UpdateLogLevels(Request.Form.level); Get["/loadlogs"] = _ => LoadLogs(); Get["/headphones"] = _ => Headphones(); Post["/headphones"] = _ => SaveHeadphones(); Get["/newsletter", true] = async(x, ct) => await Newsletter(); Post["/newsletter", true] = async(x, ct) => await SaveNewsletter(); Post["/createapikey"] = x => CreateApiKey(); Post["/testslacknotification", true] = async(x, ct) => await TestSlackNotification(); Get["/slacknotification"] = _ => SlackNotifications(); Post["/slacknotification"] = _ => SaveSlackNotifications(); Post["/testdiscordnotification", true] = async(x, ct) => await TestDiscordNotification(); Get["/discordnotification", true] = async(x, ct) => await DiscordNotification(); Post["/discordnotification", true] = async(x, ct) => await SaveDiscordNotifications(); Get["/landingpage", true] = async(x, ct) => await LandingPage(); Post["/landingpage", true] = async(x, ct) => await SaveLandingPage(); Get["/scheduledjobs", true] = async(x, ct) => await GetScheduledJobs(); Post["/scheduledjobs", true] = async(x, ct) => await SaveScheduledJobs(); Post["/clearlogs", true] = async(x, ct) => await ClearLogs(); Get["/notificationsettings", true] = async(x, ct) => await NotificationSettings(); Post["/notificationsettings"] = x => SaveNotificationSettings(); Post["/recentlyAddedTest"] = x => RecentlyAddedTest(); }
public DiscordNotification(IDiscordApi api, ISettingsService <DiscordNotificationSettings> sn) : base(sn) { Api = api; }