예제 #1
0
        private static List <SummonerSpell> GetSummonerSpells()
        {
            var pathBuilder = new UrlPathBuilder();

            using (var client = new WebClient())
            {
                try
                {
                    var summonerSpellsJson = client.DownloadString(pathBuilder.GetSummonerSpellsUrl());
                    return(JsonConvert.DeserializeObject <List <SummonerSpell> >(summonerSpellsJson));
                }
                catch (Exception) { return(new List <SummonerSpell>()); }
            }
        }