Skip to content
On this page

Seasons Client

Usage

Client used to access the Seasons Endpoints:

See also: JikanAPI Documentation

getSeason /seasons/{year}/{season}

Get the seasonal anime by year and season.

Params

Response

Example

ts
import { SeasonsClient, AnimeSeason, JikanResponse, Anime } from '@tutkli/jikan-ts';

(async () => {
    const seasonsClient = new SeasonsClient();

    await seasonsClient
        .getSeason(2023, AnimeSeason.winter)
        .then((jikanResponse: JikanResponse<Anime[]>) => { /* your code */ })
        .catch((error) => console.error(error));
})();

getSeasonNow /seasons/now

Get current seasonal anime.

Params

Response

Example

ts
import { SeasonsClient, JikanResponse, Anime } from '@tutkli/jikan-ts';

(async () => {
    const seasonsClient = new SeasonsClient();
    const searchParams = { limit: 10 };

    await seasonsClient
        .getSeasonNow(searchParams)
        .then((jikanResponse: JikanResponse<Anime[]>) => { /* your code */ })
        .catch((error) => console.error(error));
})();

getSeasonsList /seasons

Get available list of seasons.

Response

Example

ts
import { SeasonsClient, JikanResponse, SeasonsListData } from '@tutkli/jikan-ts';

(async () => {
    const seasonsClient = new SeasonsClient();

    await seasonsClient
        .getSeasonsList(searchParams)
        .then((jikanResponse: JikanResponse<SeasonsListData[]>) => { /* your code */ })
        .catch((error) => console.error(error));
})();

getUpcoming /seasons/upcoming

Get upcoming season's anime.

Params

Response

Example

ts
import { SeasonsClient, AnimeType, JikanResponse, Anime } from '@tutkli/jikan-ts';

(async () => {
    const seasonsClient = new SeasonsClient();
    const searchParams = { filter: AnimeType.tv };

    await seasonsClient
        .getSeasonUpcoming(searchParams)
        .then((jikanResponse: JikanResponse<Anime[]>) => { /* your code */ })
        .catch((error) => console.error(error));
})();