Example #1
0
        public static Task Send(SkillRequest request, MessageReceivedRequest message)
        {
            var token          = request.Context.System.ApiAccessToken;
            var challengerName = message.Message["from"];
            var notification   = new NotificationClient(NotificationClient.EuropeEndpoint, token);

            var display = new DisplayInfo {
                Content = new List <DisplayContent>()
            };
            var spoken = new SpokenInfo {
                Content = new List <SpokenText>()
            };

            AddNotificationTo(display, spoken, challengerName, "en-US");
            AddNotificationTo(display, spoken, challengerName, "en-GB");

            var reference = Guid.NewGuid().ToString("N");
            var expiry    = DateTime.Now.AddSeconds(30);

            return(notification.Create(display, spoken, reference, expiry));
        }