Getting Started
Installation
bash
npm install --save @tutkli/jikan-ts
# or
yarn add @tutkli/jikan-ts # recommended
Basic Example
Using a specific client, like AnimeClient:
ts
import { AnimeClient, JikanResponse, Anime } from '@tutkli/jikan-ts';
(async () => {
const animeClient = new AnimeClient();
await animeClient
.getAnimeById(1)
.then((jikanResponse: JikanResponse<Anime>) => console.log(jikanResponse.data.title)) // will output "Cowboy Bebob"
.catch((error) => console.error(error));
})();
Or, using the JikanClient:
ts
import { JikanClient, JikanResponse, Anime } from '@tutkli/jikan-ts';
(async () => {
const jikanClient = new JikanClient();
await jikanClient.anime
.getAnimeById(1)
.then((jikanResponse: JikanResponse<Anime>) => console.log(jikanResponse.data.title)) // will output "Cowboy Bebob"
.catch((error) => console.error(error));
})();
Leave you feedback
- Did you find this project useful? Leave a ⭐
- Found a problem? Create an issue 🔎
- Want to contribute? Submit a PR 📑