// GET api/<controller>/5 //[Route("GetByString/{querystring}")] public FakeTemplate Get(string querystring) { int finalscore = 0; if (querystring.Length >= 50) // checking if querystring is beyong 50 char { finalscore = IntegrateServices.IntegratedResult(querystring); } FakeTemplate result = new FakeTemplate(); result.url = querystring; result.fakePoints = finalscore; result.isFake = finalscore >= 5; return(result); }
// GET: api/ImageDetection/5 public FakeTemplate Get(string imageUrl) { int finalscore = 0; imageUrl = imageUrl.Replace("__", "&").Replace("_2f_", "%2F"); if (!string.IsNullOrEmpty(imageUrl)) { string texttosearch = IntegrateServices.EvaluateImage(imageUrl); if (texttosearch.Length >= 50) { finalscore = IntegrateServices.IntegratedResult(texttosearch); } //int result= BingSearch.BingNewsSearch(querystring); } FakeTemplate result = new FakeTemplate(); result.url = imageUrl; result.fakePoints = finalscore; result.isFake = finalscore >= 5; return(result); }