Пример #1
0
        public async Task <JObject> GetPokemonAdvantageAsync(PokeAdvantage pokes)
        {
            var firstPokeTypeData = await ObtainPokeDataAsync(pokes.FirstPoke);

            var secondPokeTypeData = await ObtainPokeDataAsync(pokes.SecondPoke);

            //TODO: handle actual list
            var firstPokeDamage = await ObtainDamageRelationAsync(firstPokeTypeData.Types[0].Type.Url);

            var secondPokeType = secondPokeTypeData.Types[0].Type.Name;

            var res = CheckDamageRelation(firstPokeDamage, secondPokeType);

            return(res);
        }
Пример #2
0
        public async Task <IActionResult> Get(PokeAdvantage pokes)
        {
            var res = await _pokemonService.GetPokemonAdvantageAsync(pokes);

            return(Ok(res));
        }