public IActionResult Mentions(QueryUserViewModel queryUserViewModel) { if (ModelState.IsValid) { var model = new AnalysisViewModel { Username = queryUserViewModel.TwitterHandle }; var tweets = _twitterService.GetTweetsAsync(queryUserViewModel.TwitterHandle).Result; try { model.AnalysisResults = _textAnalysis.AnalyzeTweets(tweets); } catch (Exception ex) { throw ex; } return(View(model)); } else { return(BadRequest()); } }
public IActionResult Index() { var model = new QueryUserViewModel(); return(View(model)); }