Ejemplo n.º 1
0
        public void Notify(Notification notification)
        {
            var config = _keyValueStore.Get <PushbulletConfig>("pushbullet.config");

            if (config == null)
            {
                _logger.Warn("Pushbullet not configured.");
                return;
            }

            if (string.IsNullOrEmpty(config.AccessToken))
            {
                _logger.Warn("Pushbullet access token not set.");
                return;
            }

            _pushbulletClient.Send(config.AccessToken, new Note(notification.Title, notification.Message));
        }
Ejemplo n.º 2
0
        public void TestConfig(PushbulletConfig config)
        {
            var note = new Note("Hadouken", "Test notification from Hadouken.");

            _pushbulletClient.Send(config.AccessToken, note);
        }