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)); }
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); } }
public PushbulletSharer(PushbulletSettings settings) { Settings = settings; }