private void ProcessIntends(string entityOrSlot, string intentName, ref IAppRequest iRequest, ref string controllerName) { switch (intentName) { case "companyNews": controllerName = "companyNews"; var company = entityOrSlot; company = company.StripSpecialChar(); iRequest = new CompanyData { CompanyName = company }; break; case "newsFetch": controllerName = "NewsFetch"; var newsSource = entityOrSlot; newsSource = newsSource.StripSpecialChar(); iRequest = new StandardNews { NewsSource = newsSource }; break; case "stockQuote": controllerName = "StockQuote"; company = entityOrSlot.StripSpecialChar(); iRequest = new CompanyData { CompanyName = company }; break; case "fundamentals": controllerName = "Fundamentals"; company = entityOrSlot.StripSpecialChar(); iRequest = new CompanyData { CompanyName = company }; break; case "marketSummary": controllerName = "MarketData"; iRequest = new MarketData(); break; case "recommend": controllerName = "Recommendations"; iRequest = new Recommendations(); break; default: break; } }
public async Task <IActionResult> PostAsync([FromBody] StandardNews standardNews) { _logger.LogInformation("In News Fetch Controller"); string newsToReport = await _obtainNews.GetExternalNews(standardNews.NewsSource); IAppResponse appResponse = new AppResponse { ResponseData = newsToReport, IsResponseSuccess = !newsToReport.IsNullOrWhiteSpace(), }; return(Ok(appResponse)); }