public JsonResult SearchTrack(string q) { var youtubeProvider = new YouTubeTrackProvider(); var searchResult = youtubeProvider.Search(q, maxResults: 3); return Json(searchResult, JsonRequestBehavior.AllowGet); }
public IHttpActionResult searchTrack(string query) { if (query == null) return NotFound(); var youtubeProvider = new YouTubeTrackProvider(); var searchResult = youtubeProvider.Search(query); return Ok(searchResult); }