//[HttpPost] public JsonResult FrontpageJson( string url, bool? html ) { var diffbot = new DiffbotAPI(); var source = new WebClient( ).DownloadString ( diffbot.GetEndpointUrl ( DiffbotAPI.EndPoints.Article, url, html ?? false ) ); return Json(source, JsonRequestBehavior.AllowGet); }
public JsonResult Article( string url, bool? html ) { var diffbot = new DiffbotAPI( ); var source = new WebClient( ).DownloadString ( diffbot.GetEndpointUrl ( DiffbotAPI.EndPoints.Article, url, html ?? false ) ); var model = new DiffBotArticleResultModel().Create( source ); return Json( model, JsonRequestBehavior.AllowGet ); }