Jikan API wrapper for Typescript and NodeJS with build in typings.
- 💅 Fully typed
- ♻ Http Request Cache
- 📄 Logging
- 📦 ESM with tree shaking support
📖 Check out the documentation page!
npm install --save @tutkli/jikan-ts
# or
yarn add @tutkli/jikan-tsUsing a specific client, like AnimeClient:
import { AnimeClient, JikanResponse, Anime } from '@tutkli/jikan-ts';
const animeClient = new AnimeClient();
animeClient
.getAnimeById(1)
.then((jikanResponse: JikanResponse<Anime>) => { /* ... */ })
.catch((error) => console.error(error));Or, using the JikanClient:
import { JikanClient, JikanResponse, Anime } from '@tutkli/jikan-ts';
const jikanClient = new JikanClient();
jikanClient.anime
.getAnimeById(1)
.then((jikanResponse: JikanResponse<Anime>) => { /* ... */ })
.catch((error) => console.error(error));Jikan-ts uses axios-cache-interceptor to store request results.
To use a specific configuration, pass the cacheOptions argument when instantiating a client:
import { AnimeClient } from '@tutkli/jikan-ts';
const animeClient = new AnimeClient({
cacheOptions: { ... } // axios-cache-interceptor options
}
);For more information, check out the axios-cache-interceptor Documentation.
To enable logging, pass the enableLogging argument as true.
import { AnimeClient } from '@tutkli/jikan-ts';
const animeClient = new AnimeClient({
enableLogging: true,
}
);- AnimeClient
- MangaClient
- TopClient
- SeasonsClient
- JikanClient (Main client)
- Did you find this project useful? Leave a ⭐
- Found a problem? Create an issue 🔎
- Want to contribute? Submit a PR 📑