Releases: Yurem1/PokeAPI-Enhanced
v2.3 Ability Wrapper
Ability endpoint support
Wrapper support for https://pokeapi.co/api/v2/ability has been added and can now be accessed as in the following example:
import { Pokedex } from './utility/pokedex';
// Example entry for gluttony ability
const entry = await Pokedex.getAbilities('gluttony');
// Checks if entry exists or not.
if(entry) {
// Print the name of the generation this ability was introduced.
console.log(entry.getGeneration?.name)
}
Extra comments for all components
Added more detailed comments for all components, properties, & more.
New and more concise comments provide better information without the need to access external documentations.
New pokédex class on the work
A new, and more encapsulated version is ongoing. (v3.0).
v2.2 Minor Release
Class nature fully finished
From the PokeAPI endpoint https://pokeapi.co/api/v2/nature/, this class fully offers getters to all properties that this resource posts.
Changes to sprites type
Added null types to sprites to prevent bugs/errors
Few addition of docs
Added docs to guide you through all entities.
v2.1 Minor Release
Added class Nature
From the PokeAPI endpoint https://pokeapi.co/api/v2/nature/, this class allows you to access all properties from this endpoint
Minor refactoring
Minor changes
v2.0 MAJOR Release
v2.0 Major Release
Major changes in main class
Pokedex class, aka the main class has now become fully static, & cannot be instantiated anymore.
To fully get the most of it. Whatever endpoint you are attempting to access, it must start with
.get
followed by the name of the endpoint you want to access.
For example:
const dex = await Pokedex.getPokemon('mr. mime');
Properties must be accessed through getters
All properties must be accessed through getters. Direct access will not work.
For Example:
const dex = await Pokedex.getPokemon('mr. mime.');
// You must use optional chaining to access the object, otherwise
// use if-statements.
const id = dex?.getPokemonId;
Extra Info:
Other endpoints are still being worked on and should be arriving soon in the future. stay tuned.
v1.2.7
v1.2.7 PATCH Release
Pokédex Entries Bug Fix
There was a bug that whenever you queried the pokémons "Mr. mime" or "Mime Jr."
This bug has been addressed and querying these entries should work normally
Minor changes in the code
Extra comments for all properties to help you visualize more what you're fetching.
v1.2.5
Permanent Switch to ESM
Only import is allowed for this version & future versions
Extra documentation
Every property contains a piece of documentation. This documentation can be found in the official PokeAPI docs.
Null chaining operator
Because some properties are non-existent in some pokémons, you must use null chaining operators every time you access a property