I have recently run into this issue - I don't think it's possible to determine in which version an evolution chain has been added or rather: is applicable to. This can be especially problematic when dealing with location based evolutions such as Eevee or Nosepass.
At the moment, if I wanted to only show evolution details that are version-specific, I can check if the 'from' and 'to' national dex IDs, but nothing beyond. For entries such as locations that only exist in certain versions it becomes very difficult to filter this data accurately.
Eevee can evolve into Leafeon by visiting:
- Eterna Forest: D/P/Pl and BDSP, and therefore 2 generations
- Pinwheel Forest: BW and BW2
- Route 20 in Kalos: XY
I believe both of those problems could be addressed by adding a field in the evolution chain:
evolution_details: [],
evolves_to: [],
is_baby: false,
species: {...},
id: 133,
// New
versions: [
{
name: 'black',
url: 'https://pokeapi.co/api/v2/version/17'
}
]
This would add a lot of extra data to the response. Another idea is to do something similar to the current /pokemon/id endpoint with past_types?
I'm suggesting such an approach because the issue is not limited to locations, in which case another solution might be more appropriate. See: https://bulbapedia.bulbagarden.net/wiki/Category:Pok%C3%A9mon_that_have_had_their_evolution_method_changed
I would be happy to help out with this where I can
I have recently run into this issue - I don't think it's possible to determine in which version an evolution chain has been added or rather: is applicable to. This can be especially problematic when dealing with location based evolutions such as Eevee or Nosepass.
At the moment, if I wanted to only show evolution details that are version-specific, I can check if the 'from' and 'to' national dex IDs, but nothing beyond. For entries such as locations that only exist in certain versions it becomes very difficult to filter this data accurately.
Eevee can evolve into Leafeon by visiting:
I believe both of those problems could be addressed by adding a field in the evolution chain:
This would add a lot of extra data to the response. Another idea is to do something similar to the current
/pokemon/idendpoint withpast_types?I'm suggesting such an approach because the issue is not limited to locations, in which case another solution might be more appropriate. See: https://bulbapedia.bulbagarden.net/wiki/Category:Pok%C3%A9mon_that_have_had_their_evolution_method_changed
I would be happy to help out with this where I can