public void ProcessVideoBreakDownTest()
        {
            string file = "test.json";

            Assert.IsTrue(File.Exists(file), "deployment failed: " + file +
                          " did not get deployed");
            string json = File.ReadAllText(file);
            var    res  = TranscriptProcessor.ProcessVideoBreakDown(json);

            Assert.IsNotNull(res);
        }
 // POST api/values
 public void Post([FromUri] string id, [FromUri] string state)
 {
     // I get the notification that a video is indexed
     //get the video breakdown
     if (state.Equals("Processed", StringComparison.CurrentCultureIgnoreCase))
     {
         var videoBreakdownJson =
             VideoHelper.GetVideoBreakdown(id);
         if (!String.IsNullOrEmpty(videoBreakdownJson))
         {
             var transcript = TranscriptProcessor.ProcessVideoBreakDown(videoBreakdownJson);
             // approve transcript
             // send email to all participants
             var commands = TranscriptProcessor.GetCommands(videoBreakdownJson);
             foreach (var command in commands)
             {
                 //send transcript to LUIS
                 //var jsonCmd = LUISHelper.UnderstandCommand(command);
                 var succeded = LUISHelper.ExecuteCommand(command);
             }
         }
     }
 }
Exemplo n.º 3
0
 // POST api/Process
 public string Post([FromBody] object jsonString)
 {
     return(TranscriptProcessor.ProcessVideoBreakDown(jsonString.ToString()));
 }