public async Task <IActionResult> Page(Guid id, bool draft = false) { try { var model = await _loader.GetPageAsync <StandardPage>(id, HttpContext.User, draft); model.EntryPoints = new System.Collections.Generic.List <Models.Common.EntryPoint>(); model.ItemInfo = await _adapterEngine.WaltersParse("http://Example.com/FakeURL"); return(View(model)); } catch (UnauthorizedAccessException) { return(Unauthorized()); } }
public async Task <IActionResult> GetPowerUsage(string url) { var modelInfo = await _adapterEngine.WaltersParse(url); return(Ok(modelInfo)); }