private void RLink(int siteId, HttpContext context) { context.Response.Write(WebApiProcess.GetRelatedlinks( siteId, context.Request["type"] ?? "archive", int.Parse(context.Request["contentId"]))); }
public void ProcessRequest(HttpContext context) { string apiName = context.Request["name"]; int siteId = Cms.Context.CurrentSite.SiteId; switch (apiName) { case "rlink": RLink(siteId, context); break; case "rlinked": WebApiProcess.GetRelatedArchiveLinks(siteId, int.Parse(context.Request["contentId"])); break; default: context.Response.Write("Ops.Cms WebApi ver 0.1"); break; } }