public JsonResult GetComics(int id, int page) { List <ComicResponse> response = new List <ComicResponse>(); int offset = (page * 6) - 1; foreach (Comic item in MarvelAPIUtil.GetComics(id, 6, offset)) { ComicResponse responseItem = new ComicResponse(); responseItem.Comic = item; responseItem.Total = 6; responseItem.ItemNumber = 1; response.Add(responseItem); } return(Json(response, JsonRequestBehavior.AllowGet)); }
public JsonResult GetComic(int id) { return(Json(MarvelAPIUtil.GetComicById(id), JsonRequestBehavior.AllowGet)); }
public JsonResult GetCharacters(string term) { return(Json(MarvelAPIUtil.GetCharactersByText(term), JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { return(View(MarvelAPIUtil.GetCharacters())); }