-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Clara Castillo edited this page Nov 16, 2022
·
3 revisions
npm install --save @tutkli/jikan-ts
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));
})();
- Did you find this project useful? Leave a ⭐
- Found a problem? Create an issue 🔎
- Want to contribute? Submit a PR 📑