Skip to content

Virtual-Engine/nyx-pokemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nyx-logger

Installation

To install Nyx Pokemon, use npm (Node Package Manager). Run the following command in your terminal:

Copy the code npm install nyx-pokemon How to use Here's how to use Nyx Pokemon in your project:

const PokeAPI = require('nyx-pokemon');

const pokeApi = new PokeAPI();

const pokemonName = 'pikachu';

pokeApi.getPokemon(pokemonName)
    .then(pokemon => {
        console.log(`Nom: ${pokemon.name}`);
        console.log(`ID: ${pokemon.id}`);
        console.log(`Taille: ${pokemon.height}`);
        console.log(`Poids: ${pokemon.weight}`);
        console.log(`Types: ${pokemon.types.join(', ')}`);
        console.log(`Statistiques:`);
        pokemon.stats.forEach(stat => {
            console.log(` - ${stat.name}: ${stat.value}`);
        });
        console.log(`Capacités: ${pokemon.abilities.join(', ')}`);
    })
    .catch(error => {
        console.error(error.message);
    });

Contributions

Contributions are welcome! If you'd like to improve the module, don't hesitate to submit a pull request.

License This project is licensed under the MIT license. See the LICENSE file for more information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published