public MovieDB getNew()
        {
            string url = string.Format("http://api.themoviedb.org/3/movie/now_playing?language=en&api_key={0}", apikey);

            mdb = JsonConvert.DeserializeObject <MovieDB>(ApiCall.ApiGET(url));
            return(mdb);
        }
Exemple #2
0
        public TVDB getNew()
        {
            string url = string.Format("https://api.themoviedb.org/3/tv/airing_today?&api_key={0}", apikey);

            tvdb = JsonConvert.DeserializeObject <TVDB>(ApiCall.ApiGET(url));
            return(tvdb);
        }
        public GameDetail getDetail(string id)
        {
            string url = string.Format("http://www.giantbomb.com/api/game/3030-{0}/?api_key={1}&format=json&field_list=deck,genres,id,image,images,name,original_game_rating,original_release_date,similar_games,site_detail_url,themes,videos,platforms", id, apikey);

            GameDetail temp = new GameDetail();

            temp = JsonConvert.DeserializeObject <GameDetail>(ApiCall.ApiGET(url));
            return(temp);
        }
Exemple #4
0
        public Review getReview(string id)
        {
            string url = string.Format("https://api.themoviedb.org/3/tv/{0}/reviews?api_key={1}", id, apikey);

            Review review = new Review();

            review = JsonConvert.DeserializeObject <Review>(ApiCall.ApiGET(url));
            return(review);
        }
Exemple #5
0
        private TVDB_Genre getGenreList()
        {
            string url = string.Format("https://api.themoviedb.org/3/genre/tv/list?&api_key={0}", apikey);

            TVDB_Genre genrelist = new TVDB_Genre();

            genrelist = JsonConvert.DeserializeObject <TVDB_Genre>(ApiCall.ApiGET(url));
            return(genrelist);
        }
Exemple #6
0
        public Credit getCredit(string id)
        {
            string url = string.Format("https://api.themoviedb.org/3/tv/{0}/credits?api_key={1}", id, apikey);

            Credit credit = new Credit();

            credit = JsonConvert.DeserializeObject <Credit>(ApiCall.ApiGET(url));
            return(credit);
        }
Exemple #7
0
        public Image getImage(string id)
        {
            string url = string.Format("https://api.themoviedb.org/3/tv/{0}/images?api_key={1}", id, apikey);

            Image img = new Image();

            img = JsonConvert.DeserializeObject <Image>(ApiCall.ApiGET(url));
            return(img);
        }
Exemple #8
0
        public Similar getSimilar(string id)
        {
            string url = string.Format("https://api.themoviedb.org/3/tv/{0}/similar?api_key={1}", id, apikey);

            Similar sim = new Similar();

            sim = JsonConvert.DeserializeObject <Similar>(ApiCall.ApiGET(url));
            return(sim);
        }
Exemple #9
0
        public Video getVideo(string id)
        {
            string url = string.Format("https://api.themoviedb.org/3/tv/{0}/videos?api_key={1}", id, apikey);

            Video vid = new Video();

            vid = JsonConvert.DeserializeObject <Video>(ApiCall.ApiGET(url));
            return(vid);
        }
Exemple #10
0
        public Title getTitle(string id)
        {
            string url = string.Format("https://api.themoviedb.org/3/tv/{0}?api_key={1}", id, apikey);

            Title title = new Title();

            title = JsonConvert.DeserializeObject <Title>(ApiCall.ApiGET(url));
            return(title);
        }
        public SearchGameDB getNew()
        {
            DateTime dateTime = DateTime.UtcNow.Date;
            string   today    = dateTime.ToString("yyyy-mm-dd");
            string   url      = string.Format("http://www.giantbomb.com/api/games/?api_key={0}&sort=original_release_date:desc&format=json&limit=50&filter=original_release_date:1990-1-1|{1}", apikey, today);

            SearchGameDB gdb = new SearchGameDB();

            gdb = JsonConvert.DeserializeObject <SearchGameDB>(ApiCall.ApiGET(url));
            return(gdb);
        }
        public ActionResult Search(string query)
        {
            ViewBag.Query = query;
            string url = string.Format("http://www.giantbomb.com/api/search?api_key={0}&format=json&query={1}&resources=game", apikey, query);

            GameModel searchList = new GameModel();

            searchList.SearchDB = JsonConvert.DeserializeObject <SearchGameDB>(ApiCall.ApiGET(url));

            return(View(searchList));
        }
Exemple #13
0
        public ActionResult Search(string query)
        {
            ViewBag.Query = query;
            string url = string.Format("https://api.themoviedb.org/3/search/tv?&api_key={0}&query={1}", apikey, query);

            TVSearchViewModel svm = new TVSearchViewModel();

            svm.TV    = JsonConvert.DeserializeObject <TVDB>(ApiCall.ApiGET(url));
            svm.Query = query;

            return(View(svm));
        }
        public ActionResult Title()
        {
            try
            {
                string    gameID    = Url.RequestContext.RouteData.Values["id"].ToString();
                GameModel gameModel = new GameModel();
                gameModel.gd = getDetail(gameID);
                // Getting Video Links
                if (gameModel.gd.results.videos != null)
                {
                    gameModel.Videos = new List <Video>();
                    foreach (GameDetail.Video video in gameModel.gd.results.videos)
                    {
                        try
                        {
                            string url  = string.Format("http://www.giantbomb.com/api/video/2300-{0}/?api_key={1}&format=json", video.id, apikey);
                            Video  temp = JsonConvert.DeserializeObject <Video>(ApiCall.ApiGET(url));
                            gameModel.Videos.Add(temp);
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                }

                if (gameModel.gd.results.similar_games != null)
                {
                    gameModel.sg = new List <SimilarGame>();
                    foreach (GameDetail.Similar_Games sg in gameModel.gd.results.similar_games)
                    {
                        try
                        {
                            string      url  = string.Format("http://www.giantbomb.com/api/game/3030-{0}/?api_key={1}&format=json&field_list=image,id", sg.id, apikey);
                            SimilarGame temp = JsonConvert.DeserializeObject <SimilarGame>(ApiCall.ApiGET(url));
                            gameModel.sg.Add(temp);
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                }

                return(View(gameModel));
            }
            catch (Exception ex)
            {
                GameModel gameModel = new GameModel();
                gameModel.gd = new GameDetail();
                return(View(gameModel));
            }
        }