Пример #1
0
        // GET: Summoner
        public ActionResult Index(string name)
        {
            Dictionary <string, SummonerDTO> p = APICalls.CallApi <Dictionary <string, SummonerDTO> >("https://na.api.pvp.net", "/api/lol/na/v1.4/summoner/by-name/" + name + "?api_key=");
            SummonerDTO play  = p.First().Value;
            var         model = APICalls.CallApi <RankedStatsDTO>("https://na.api.pvp.net", "/api/lol/na/v1.3/stats/by-summoner/" + play.id.ToString() + "/ranked?season=SEASON2016&api_key=");

            return(View(model));
        }
Пример #2
0
        // GET: ViewChampion
        public ActionResult ViewChampion(int id = 1)
        {
            var c = APICalls.CallApi <ChampionModel>("https://global.api.pvp.net/", "/api/lol/static-data/na/v1.2/champion/" + id.ToString() + "?champData=all&api_key=");

            return(View(c));
        }
Пример #3
0
        // GET: Match
        public ActionResult Index(uint id = 2210058201)
        {
            var model = APICalls.CallApi <MatchDetail>("https://na.api.pvp.net", "/api/lol/na/v2.2/match/" + id.ToString() + "?includeTimeline=true&api_key=");

            return(View(model));
        }