public void Send(Reminder reminder) { var message = $"Reminder: {reminder.Url}"; var apiKey = reminder.User.UserNotificationType.Value; var client = new PushBulletClient(apiKey); client.PushAsync("Url Reminder", message, string.Empty).Wait(); }
public async Task SendNotificationAsync(string subject, string body) { var configuration = _Configuration.Value(); if (!configuration.IsEnabled()) { _Logger.Log(LogLevel.Debug, "Pushbullet notification channel is not enabled"); return; } var client = new PushBulletClient(configuration.AccessToken); await client.PushAsync(subject, body, null).NotNull(); }