Gabb-c / pokenode-ts

A lightweight Node.js wrapper for the PokéAPI with built-in types.
https://pokenode-ts.vercel.app/
MIT License
244 stars 28 forks source link

Get all Pokemons by generation #833

Closed moyzlevi closed 1 year ago

moyzlevi commented 1 year ago

Describe the feature you'd like to request

I'd like to request a feature that can retrieve all pokemons from the poke-api that belong to the same generation. Like getting all the pokemons of generation III or II. Currently the poke-api doesn't have this feature, but it would be nice to ease a pokedex-like web app.

Describe the solution you'd like

The only solution I can think of is doing a request of all 1200 pokemons from the api and after that, filtering the array to return only the pokemons of the specific generation.

Describe alternatives you've considered

There are no alternatives.

moyzlevi commented 1 year ago

The poke api already does this by sending all pokemons by generation in the generation Resource. My bad. I'm gonna close this issue