1.20.0 • Published 11 months ago

pokenode-ts v1.20.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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
npm i axios axios-cache-interceptor pokenode-ts

# Yarn
yarn add axios axios-cache-interceptor pokenode-ts

# Pnpm
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)) // will output "Luxray"
    .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)) // will output "Luxray"
    .catch((error) => console.error(error));
})();

Documentation

Check out our Documentation page!

Security

Every change in this project is analyzed by SonarCloud

Quality Gate Status Bugs Code Smells Quality Gate Status codecov

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 ❤️

Analytics

1.19.0

12 months ago

1.19.1

11 months ago

1.20.0

11 months ago

1.18.1

1 year ago

1.18.0

1 year ago

1.18.3

1 year ago

1.18.2

1 year ago

1.17.0

2 years ago

1.15.0

2 years ago

1.13.2

2 years ago

1.14.0

2 years ago

1.16.1

2 years ago

1.16.0

2 years ago

1.13.1

2 years ago

1.13.0

2 years ago

1.12.0

2 years ago

1.11.1

2 years ago

1.11.0

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.9.1

3 years ago

1.9.2

2 years ago

1.9.0

3 years ago

1.8.2

3 years ago

1.8.1

3 years ago

1.8.0

3 years ago

1.7.5

3 years ago

1.7.4

3 years ago

1.7.3

3 years ago

1.7.2

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago