MCPcopy Index your code
hub / github.com/Gabb-c/pokenode-ts

github.com/Gabb-c/pokenode-ts @v1.20.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.20.0 ↗ · + Follow
320 symbols 567 edges 95 files 143 documented · 45% updated 1d agov1.20.0 · 2023-06-22★ 3181 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

Extension points exported contracts — how you extend this code

OfficialArtwork (Interface)
Official Artwork sprites
src/models/Pokemon/pokemon.ts
ClientArgs (Interface)
(no doc)
src/structures/base.ts
Silver (Interface)
Silver sprites
src/models/Pokemon/pokemon.ts
ContestType (Interface)
(no doc)
src/models/Contest/contest.ts
ContestName (Interface)
(no doc)
src/models/Contest/contest.ts
ContestEffect (Interface)
(no doc)
src/models/Contest/contest.ts

Core symbols most depended-on inside this repo

getListURL
called by 48
src/structures/base.ts
getGenerationByName
called by 2
src/clients/game.client.ts
getMachineById
called by 2
src/clients/machine.client.ts
getContestTypeByName
called by 2
src/clients/contest.client.ts
getEncounterMethodByName
called by 2
src/clients/encounter.client.ts
getGrowthRateById
called by 2
src/clients/pokemon.client.ts
getPokeathlonStatById
called by 2
src/clients/pokemon.client.ts
getPokemonByName
called by 2
src/clients/pokemon.client.ts

Shape

Interface 144
Method 144
Class 26
Function 5
Enum 1

Languages

TypeScript100%

Modules by API surface

src/models/Pokemon/pokemon.ts53 symbols
src/clients/pokemon.client.ts47 symbols
src/clients/move.client.ts23 symbols
src/clients/item.client.ts17 symbols
src/clients/location.client.ts14 symbols
src/clients/game.client.ts14 symbols
src/models/Moves/moves.ts13 symbols
src/clients/encounter.client.ts11 symbols
src/clients/berry.client.ts11 symbols
src/clients/contest.client.ts9 symbols
src/models/Item/item.ts8 symbols
src/clients/evolution.client.ts7 symbols

For agents

$ claude mcp add pokenode-ts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact