Skip to content
Clara Castillo edited this page Nov 16, 2022 · 3 revisions

Installation

npm install --save @tutkli/jikan-ts

Basic Example

Using a specific client, like AnimeClient:

import { AnimeClient } from '@tutkli/jikan-ts';

(async () => {
  const api = new AnimeClient();

  await api
    .getAnimeById(1)
    .then((jikanResponse) => console.log(jikanResponse.data.title)) // will output "Cowboy Bebob"
    .catch((error) => console.error(error));
})();

Or, using the JikanClient:

import { JikanClient } from '@tutkli/jikan-ts';

(async () => {
  const api = new JikanClient();

  await api.anime
    .getAnimeById(1)
    .then((jikanResponse) => console.log(jikanResponse.data.title)) // will output "Cowboy Bebob"
    .catch((error) => console.error(error));
})();

Leave you feedback

Clone this wiki locally