コード例 #1
0
        public override bool CheckConfig(UploadersConfig config)
        {
            PushbulletSettings pushbulletSettings = config.PushbulletSettings;

            return(pushbulletSettings != null && !string.IsNullOrEmpty(pushbulletSettings.UserAPIKey) && pushbulletSettings.DeviceList != null &&
                   pushbulletSettings.DeviceList.IsValidIndex(pushbulletSettings.SelectedDevice));
        }
コード例 #2
0
ファイル: TesterController.cs プロジェクト: sir-marv/Ombi
        public bool Pushbullet([FromBody] PushbulletSettings settings)
        {
            try
            {
                settings.Enabled = true;
                PushbulletNotification.NotifyAsync(
                    new NotificationOptions {
                    NotificationType = NotificationType.Test, RequestId = -1
                }, settings);

                return(true);
            }
            catch (Exception e)
            {
                Log.LogError(LoggingEvents.Api, e, "Could not test Pushbullet");
                return(false);
            }
        }
コード例 #3
0
 public PushbulletSharer(PushbulletSettings settings)
 {
     Settings = settings;
 }