public GetEndpointUrl ( string type, string url, bool useHtml = false ) : string | ||
type | string | |
url | string | |
useHtml | bool | |
return | string |
//[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 ); }