Exemplo n.º 1
0
        public JsonResult Subscribe(string title)
        {
            // make an API call to subscribe
            _interestsService.Subscribe("user2", new Interest()
            {
                Title = title
            });

            // send slack notifications (although my intention was to have it in a separate console application but I am limited by time)
            // Call the Api to get the content of the interest and send

            var content = _interestsService.GetContentForInterest(title);

            NotificationProvider.SendSlackNotification("Demo Message", "user2", title, content.Result);

            return(Json(""));
        }