public async Task <ActionResult> LinkListPost(string apiKey) { var ulgena = new UlgenaApi.Ulgena(apiKey); var linkResponse = await ulgena.LinkList(); ViewData["link_result"] = JsonConvert.SerializeObject(linkResponse, Formatting.Indented); return(View("LinkList")); }
public async Task <ActionResult> LinkCreatePost(string apiKey, string apiTitle, string apiStrategy, string apiDestination) { var ulgena = new UlgenaApi.Ulgena(apiKey); var strategy = UlgenaLink.ParseEnum <UlgenaLinkStrategy>(apiStrategy); var linkResponse = await ulgena.LinkCreate(strategy, apiTitle, apiDestination); ViewData["link_result"] = JsonConvert.SerializeObject(linkResponse, Formatting.Indented); return(View("LinkCreate")); }