public ActionResult Index() { var openDrawRequest = new OpenDrawsRequest() { CompanyId = ConfigurationManager.AppSettings[AppSettingValues.LottoCompanyId], MaxDrawCount = 10, OptionalProductFilter = new[] { "TattsLotto", "MonWedLotto", "OzLotto", "MonWedLotto", "Powerball", "Super66" } }; var latestResultsRequest = new LatestResultsRequest() { CompanyId = ConfigurationManager.AppSettings[AppSettingValues.LottoCompanyId], MaxDrawCountPerProduct = 10, OptionalProductFilter = new[] { "TattsLotto" } }; var viewModel = new Home() { OpenDrawItems = _openDrawsServiceProvider.GetOpenDraws(openDrawRequest) .Result?.Draws.OrderBy(x => x.DrawDate).ToList(), LatestResultItems = _latestResultsServiceProvider.GetLatestResults(latestResultsRequest) .Result?.DrawResults.OrderBy(x => x.DrawDate).ToList() }; return(View(viewModel)); }
public async Task <LatestResultsApiResponse> GetLatestResults(LatestResultsRequest request) { return(await PostAsync <LatestResultsApiResponse>("/sales/vmax/web/data/lotto/latestresults", request).ConfigureAwait(false)); }