Closed MK-404 closed 9 months ago
Pokemon
and PokemonSpecies
are two completely different resources with unrelated ID numbers. You should treat the URLs returned by the API as opaque strings and should never mutate or assemble them in code. Follow the links, don't create them yourself.
Obviously you can set your own limit
and offset
URL query parameters on resource lists, but you should treat the URL pathname as a static string.
Some Pokémon such as Dudunsparce and Glimmet are assigned at a different id than national dex number
This leads to errors that can occur if you try to access the same Pokémon again via ${mon}.varieties.${n}.pokemon.url
It return "https://pokeapi.co/api/v2/pokemon/xxx/" instead of "https://pokeapi.co/api/v2/pokemon-species/xxx/"