Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 public JsonResult GetComic(int id)
 {
     return(Json(MarvelAPIUtil.GetComicById(id), JsonRequestBehavior.AllowGet));
 }
Esempio n. 3
0
 public JsonResult GetCharacters(string term)
 {
     return(Json(MarvelAPIUtil.GetCharactersByText(term), JsonRequestBehavior.AllowGet));
 }
Esempio n. 4
0
 public ActionResult Index()
 {
     return(View(MarvelAPIUtil.GetCharacters()));
 }