pokenode-ts
A lightweight Node.js wrapper for the PokéAPI with built-in types. An easy way to integrate your app with the PokéAPI.
Features
- 🛠️ Built-in typings
- 📦 Axios with auto-cache requests
- 🌲 Logging
Installation
npm i axios axios-cache-interceptor pokenode-ts
yarn add axios axios-cache-interceptor pokenode-ts
pnpm i axios axios-cache-interceptor pokenode-ts
Basic Example
Using a client, like PokemonClient:
import { PokemonClient } from 'pokenode-ts';
(async () => {
const api = new PokemonClient();
await api
.getPokemonByName('luxray')
.then((data) => console.log(data.name))
.catch((error) => console.error(error));
})();
Or, using the MainClient:
import { MainClient } from 'pokenode-ts';
(async () => {
const api = new MainClient();
await api.pokemon
.getPokemonByName('luxray')
.then((data) => console.log(data.name))
.catch((error) => console.error(error));
})();
Documentation
Check out our Documentation page!
Security
Every change in this project is analyzed by SonarCloud
Leave your feedback
Donate
Please consider donating if you think pokenode-ts is helpful to you or that my work is valuable. I am happy if you can buy me a coffee ❤️