public async Task <ActionResult> SearchPackageAsync(string p, string v, string f, string q) { var package = await PackageData.GetAsync(p, v); var results = await Task.Run(() => package.Search(f, q)); return(Json(results)); }
public async Task <ActionResult> GetBadgeAsync(string id, string v) { var package = await PackageData.GetAsync(id, v, httpClientFactory.CreateClient()); var content = DrawBadge(package); HttpContext.Response.Headers.Add("Cache-Control", "max-age=3600"); var r = Content(content); r.ContentType = "image/svg+xml"; return(r); }