Ejemplo n.º 1
0
        private List <AbilityPrint> GetAbilityList(Pokemon poke)
        {
            var list = new List <AbilityPrint>();

            foreach (AbilityContainer a in poke.abilities)
            {
                string[] url = a.ability.url.Split('/');
                request     = new RestRequest("ability/" + url[6]);
                response    = client.Get(request);
                abilityInfo = JsonConvert.DeserializeObject <AbilityInfo>(response.Content);
                list.Add(new AbilityPrint()
                {
                    abilityName = Pokedex.NameToUpper(a.ability.name), abilityEffect = abilityInfo.effect_entries[0].effect
                });
            }

            return(list);
        }