コード例 #1
0
        public object Post(TestNotification request)
        {
            var options = GetOptions(request.UserID);

            var parameters = new Dictionary<string, string>
            {
                {"token", options.Token},
                {"user", options.UserKey},
                {"title", "Test Notification" },
                {"message", "This is a test notification from MediaBrowser"}
            };

            _logger.Debug("Pushover <TEST> to {0} - {1}", options.Token, options.UserKey);

            return _httpClient.Post(new HttpRequestOptions { Url = "https://api.pushover.net/1/messages.json" }, parameters);
        }
コード例 #2
0
        public void Post(TestNotification request)
        {
            var task = PostAsync(request);

            Task.WaitAll(task);
        }