@tutkli/jikan-ts
Version:
Node.js wrapper for the Jikan API with built-in typings.
1,050 lines (1,046 loc) • 28.5 kB
TypeScript
// Generated by dts-bundle-generator v9.5.1
import { AxiosError, AxiosInstance } from 'axios';
import { AxiosCacheInstance, CacheAxiosResponse, CacheOptions, InternalCacheRequestConfig } from 'axios-cache-interceptor';
export interface JikanImages {
jpg: JikanImagesCollection;
webp?: JikanImagesCollection;
}
export interface JikanImagesCollection {
image_url: string;
small_image_url?: string;
medium_image_url?: string;
large_image_url?: string;
maximum_image_url?: string;
}
export interface JikanPerson {
mal_id: number;
url: string;
images: JikanImages;
name: string;
}
export interface CommonCharacter {
character: CommonCharacterData & {
name: string;
};
role: CharacterRole;
}
export interface CommonCharacterData {
mal_id: number;
url: string;
images: JikanImages;
}
export interface CharacterVoiceActor {
person: JikanPerson;
language: string;
}
export type CharacterRole = "Main" | "Supporting";
export interface JikanMoreInfo {
moreinfo: string;
}
export interface JikanNews {
mal_id: number;
url: string;
title: string;
date: string;
author_username: string;
author_url: string;
forum_url: string;
images: JikanImages;
comments: number;
excerpt: string;
}
export interface Recommendation {
entry: RecommendationEntry;
}
export interface RecommendationEntry {
mal_id: number;
url: string;
images: JikanImages;
title: string;
}
export interface JikanRelation {
relation: string;
entry: RelationEntry[];
}
export interface RelationEntry {
mal_id: number;
type: string;
name: string;
url: string;
}
export interface JikanResource {
mal_id: number;
type: string;
name: string;
url: string;
}
export interface JikanNamedResource {
name: string;
url: string;
}
export interface JikanResourceTitle {
type: string;
title: string;
}
export interface JikanResourcePeriod {
from: string;
to: string;
prop: {
from: {
day: number;
month: number;
year: number;
};
to: {
day: number;
month: number;
year: number;
};
string: string;
};
}
export interface JikanResourceRelation {
relation: string;
entry: JikanResource[];
}
export interface SeasonsListData {
year: number;
seasons: AnimeSeason[];
}
export interface Statistics {
completed: number;
on_hold: number;
dropped: number;
total: number;
scores: StatisticsScore[];
}
export interface StatisticsScore {
score: number;
votes: number;
percentage: number;
}
export interface JikanForum {
mal_id: number;
url: string;
title: string;
date: string;
author_username: string;
author_url: string;
comments: number;
last_comment: {
url: string;
author_username: string;
author_url: string;
date: string;
};
}
export type ForumFilter = "all" | "episode" | "other";
export interface JikanExternalLink {
name: string;
url: string;
}
export interface AnimeCharacter extends CommonCharacter {
voice_actors: CharacterVoiceActor[];
}
export interface AnimeEpisode {
mal_id: number;
url: string;
title: string;
title_japanese: string;
title_romanji: string;
duration: number;
aired: string;
filler: boolean;
recap: boolean;
forum_url: string;
}
export interface AnimePicture {
images: JikanImages;
}
export interface AnimeStaff {
person: JikanPerson;
positions: string[];
}
export interface AnimeStatistics extends Statistics {
watching: number;
plan_to_watch: number;
}
export interface AnimeVideos {
promo: AnimePromoVideo[];
episodes: AnimeEpisodeVideo[];
music_videos: AnimeMusicVideo[];
}
export type AnimePromoVideo = {
title: string;
trailer: AnimeYoutubeVideo;
};
export interface AnimeYoutubeVideo {
youtube_id: string;
url: string;
embed_url: string;
images?: JikanImagesCollection;
}
export interface AnimeEpisodeVideo {
mal_id: number;
url: string;
title: string;
episode: string;
images: JikanImages;
}
export interface AnimeMusicVideo {
title: string;
video: AnimeYoutubeVideo;
meta: AnimeVideoMeta;
}
export interface AnimeVideoMeta {
title: string;
author: string;
}
export interface Anime {
mal_id: number;
url: string;
images: JikanImages;
trailer: AnimeYoutubeVideo;
approved: boolean;
titles: JikanResourceTitle[];
title: string;
title_english?: string;
title_japanese: string;
title_synonyms: string[];
type: AnimeType;
source: string;
episodes: number;
status: AnimeStatus;
airing: boolean;
aired: JikanResourcePeriod;
duration: string;
rating: AnimeRating;
score: number;
scored_by: number;
rank: number;
popularity: number;
members: number;
favorites: number;
synopsis?: string;
background: string;
season?: AnimeSeason;
year: number;
broadcast: AnimeBroadcast;
producers: JikanResource[];
licensors: JikanResource[];
studios: JikanResource[];
genres: JikanResource[];
explicit_genres: JikanResource[];
themes: JikanResource[];
demographics: JikanResource[];
relations?: JikanResourceRelation[];
theme?: AnimeTheme;
external?: JikanNamedResource[];
streaming: JikanNamedResource[];
}
export interface AnimeBroadcast {
day: string;
time: string;
timezone: string;
string: string;
}
export interface AnimeTheme {
openings: string[];
endings: string[];
}
export type AnimeType = "TV" | "Movie" | "Ova" | "Special" | "Ona" | "Music";
export type AnimeStatus = "Finished Airing" | "Currently Airing" | "Complete" | "Not yet aired";
export type AnimeRating = "g" | "pg" | "pg13" | "r17" | "r" | "rx";
export type AnimeSeason = "spring" | "summer" | "fall" | "winter";
export interface Character {
mal_id: number;
url: string;
images: JikanImages;
name: string;
name_kanji: string;
nicknames: string[];
favorites: number;
about: string;
}
export interface CharacterFull extends Character {
anime: CharacterAnime[];
manga: CharacterManga[];
voices: CharacterVoiceActor[];
}
export interface CharacterAnime {
role: CharacterRole;
anime: CommonCharacterData & {
title: string;
};
}
export interface CharacterManga {
role: CharacterRole;
manga: CommonCharacterData & {
title: string;
};
}
export interface Genre extends JikanNamedResource {
mal_id: number;
count: number;
}
export interface MangaStatistics extends Statistics {
reading: number;
plan_to_read: number;
}
export interface Manga {
mal_id: number;
url: string;
images: JikanImages;
approved: boolean;
titles: JikanResourceTitle[];
title: string;
title_english?: string;
title_japanese: string;
title_synonyms?: string[];
type: MangaType;
chapters: number;
volumes: number;
status: MangaStatus;
publishing: boolean;
published: JikanResourcePeriod;
score: number;
scored_by: number;
rank: number;
popularity: number;
members: number;
favorites: number;
synopsis: string;
background: string;
authors: JikanResource[];
serializations: JikanResource[];
genres: JikanResource[];
explicit_genres: JikanResource[];
themes: JikanResource[];
demographics: JikanResource[];
relations?: JikanResourceRelation[];
external?: JikanNamedResource[];
}
export type MangaType = "Manga" | "Novel" | "Lightnovel" | "Oneshot" | "Doujin" | "Manhwa" | "Manhua";
export type MangaStatus = "Publishing" | "Complete" | "On Hiatus" | "Discontinued" | "Upcoming";
export type SortOptions = "asc" | "desc";
export type SearchOrder = "mal_id" | "title" | "start_date" | "end_date" | "score" | "scored_by" | "rank" | "popularity" | "members" | "favorites";
export type AnimeSearchOrder = "type" | "rating" | "episodes" | SearchOrder;
export type AnimeSearchStatus = "airing" | "complete" | "upcoming";
export type MangaSearchOrder = "chapters" | "volumes" | SearchOrder;
export type MangaSearchStatus = "publishing" | "complete" | "hiatus" | "discontinued" | "upcoming";
export interface JikanSearchParams {
q?: string;
page?: number;
limit?: number;
score?: number;
min_score?: number;
max_score?: number;
sfw?: boolean;
genres?: string;
genres_exclude?: string;
sort?: SortOptions;
letter?: string;
producers?: string;
start_date?: string;
end_date?: string;
unapproved?: boolean;
}
/**
* QueryParams used in **getMangaSearch** call
*
* See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/manga/operation/getMangaSearch)
*/
export interface MangaSearchParams extends JikanSearchParams {
type?: MangaType;
status?: MangaSearchStatus;
order_by?: MangaSearchOrder;
magazines?: string;
}
/**
* QueryParams used in **getAnimeSearch** call
*
* See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/anime/operation/getAnimeSearch)
*/
export interface AnimeSearchParams extends JikanSearchParams {
type?: AnimeType;
status?: AnimeSearchStatus;
rating?: AnimeRating;
order_by?: AnimeSearchOrder;
}
export interface CharactersSearchParams {
page?: number;
limit?: number;
q?: string;
order_by?: CharactersSearchOrder;
sort?: SortOptions;
letter?: string;
}
export type CharactersSearchOrder = "mal_id" | "name" | "favorites";
export type GenresFilter = "genres" | "explicit_genres" | "themes" | "demographics";
export interface SchedulesParams {
page?: number;
limit?: number;
filter?: SchedulesFilter;
kids?: boolean;
sfw?: boolean;
unapproved?: boolean;
}
export type SchedulesFilter = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "unknown" | "other";
export interface JikanSeasonsParams {
page?: number;
limit?: number;
filter?: AnimeType;
}
/**
* QueryParams used in **getSeasonNow** call
*/
export type SeasonNowParams = Omit<JikanSeasonsParams, "filter">;
export type TopFilter = "upcoming" | "bypopularity" | "favorite";
export type TopAnimeFilter = "airing" | TopFilter;
export type TopMangaFilter = "publishing" | TopFilter;
export interface JikanTopParams {
page?: number;
limit?: number;
}
/**
* QueryParams used in **getTopAnime** call
*
* See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/top/operation/getTopAnime)
*/
export interface AnimeTopParams extends JikanTopParams {
type?: AnimeType;
filter?: TopAnimeFilter;
}
/**
* QueryParams used in **getTopManga** call
*
* See also: [Jikan API Documentation](https://docs.api.jikan.moe/#tag/top/operation/getTopManga)
*/
export interface MangaTopParams extends JikanTopParams {
type?: MangaType;
filter?: TopMangaFilter;
}
export interface JikanPagination {
last_visible_page: number;
has_next_page: boolean;
items?: JikanPaginationItems;
}
export interface JikanPaginationItems {
count: number;
total: number;
per_page: number;
}
export interface JikanResponse<T> {
data: T;
pagination?: JikanPagination;
}
/**
* **Client Args**
*
* Used to pass optional configuration for logging and cache to the clients.
*/
export interface ClientArgs {
/**
* **EnableLogging**
* Enables logging request responses.
*/
enableLogging: boolean;
/**
* **Axios Cache Options**
* Options for cache.
* @see https://axios-cache-interceptor.js.org/#/pages/configuration
*/
cacheOptions: Partial<CacheOptions>;
/**
* **Axios Instance**
* The ability to build your own axios instance if you need it
*/
axiosInstance?: AxiosInstance | AxiosCacheInstance;
}
/**
* **Base Client**
*
* This client is responsible for creating an Axios Instance and the cache and logging configurations
*/
export declare abstract class BaseClient {
private api;
constructor(clientOptions?: Partial<ClientArgs>);
protected getResource<T>(endpoint: string, pathParams?: {
[key in string]: unknown;
}, params?: {
[key in string]: unknown;
}): Promise<JikanResponse<T>>;
private replacePathParams;
private addLoggingInterceptors;
}
/**
* **Anime Client**
*
* Client used to access the Anime Endpoints:
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class AnimeClient extends BaseClient {
/**
* Get complete anime resource data
* @param id anime id
*/
getAnimeFullById(id: number): Promise<JikanResponse<Anime>>;
/**
* Get anime resource
* @param id anime id
*/
getAnimeById(id: number): Promise<JikanResponse<Anime>>;
/**
* Get characters of a specific anime
* @param id anime id
*/
getAnimeCharacters(id: number): Promise<JikanResponse<AnimeCharacter[]>>;
/**
* Get staff of a specific Anime
* @param id anime id
*/
getAnimeStaff(id: number): Promise<JikanResponse<AnimeStaff[]>>;
/**
* Get a list of all the episodes of a specific anime
* @param id anime id
* @param page page number
*/
getAnimeEpisodes(id: number, page?: number): Promise<JikanResponse<AnimeEpisode[]>>;
/**
* Get a single episode of a specific anime by its id
* @param anime_id anime id
* @param episode_id episode id
*/
getAnimeEpisodeById(anime_id: number, episode_id: number): Promise<JikanResponse<AnimeEpisode>>;
/**
* Get a list of news articles related to the anime
* @param id anime id
* @param page page number
*/
getAnimeNews(id: number, page: number): Promise<JikanResponse<JikanNews[]>>;
/**
* Get a list of forum topics related to the anime
* @param id anime id
* @param filter filter topics
*/
getAnimeForum(id: number, filter?: ForumFilter): Promise<JikanResponse<JikanForum[]>>;
/**
* Get videos related to the anime
* @param id anime id
*/
getAnimeVideos(id: number): Promise<JikanResponse<AnimeVideos>>;
/**
* Get episode videos related to the anime
* @param id anime id
* @param page page number
*/
getAnimeEpisodeVideos(id: number, page?: number): Promise<JikanResponse<AnimeEpisodeVideo[]>>;
/**
* Get pictures related to the Anime
* @param id anime id
*/
getAnimePictures(id: number): Promise<JikanResponse<AnimePicture[]>>;
/**
* Get statistics related to the Anime
* @param id anime id
*/
getAnimeStatistics(id: number): Promise<JikanResponse<AnimeStatistics>>;
/**
* Get more info related to the anime
* @param id anime id
*/
getAnimeMoreInfo(id: number): Promise<JikanResponse<JikanMoreInfo>>;
/**
* Get recommendations based on the anime
* @param id anime id
*/
getAnimeRecommendations(id: number): Promise<JikanResponse<Recommendation[]>>;
/**
* Get anime relations
* @param id anime id
*/
getAnimeRelations(id: number): Promise<JikanResponse<JikanRelation[]>>;
/**
* Get anime external links
* @param id anime id
*/
getAnimeExternal(id: number): Promise<JikanResponse<JikanExternalLink[]>>;
/**
* Get all the Animes within the given filter. Returns all the Animes if no filters are given.
* @param searchParams Filter parameters
*/
getAnimeSearch(searchParams?: Partial<AnimeSearchParams>): Promise<JikanResponse<Anime[]>>;
}
/**
* **Characters Client**
*
* Client used to access the Character Endpoints:
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class CharactersClient extends BaseClient {
/**
* Get complete Character data
* @param id The Character ID
*/
getCharacterFullById(id: number): Promise<JikanResponse<CharacterFull>>;
/**
* Get Character data
* @param id The Character ID
*/
getCharacterById(id: number): Promise<JikanResponse<Character>>;
/**
* Get Character anime data
* @param id The Character ID
*/
getCharacterAnime(id: number): Promise<JikanResponse<CharacterAnime[]>>;
/**
* Get Character manga data
* @param id The Character ID
*/
getCharacterManga(id: number): Promise<JikanResponse<CharacterManga[]>>;
/**
* Get Character voices data
* @param id The Character ID
*/
getCharacterVoiceActors(id: number): Promise<JikanResponse<CharacterVoiceActor[]>>;
/**
* Get Character pictures data
* @param id The Character ID
*/
getCharacterPictures(id: number): Promise<JikanResponse<JikanImagesCollection[]>>;
/**
* Get all the Characters within the given filter. Returns all Characters if no filters are given.
* @param searchParams Filter parameters
*/
getCharacterSearch(searchParams: Partial<CharactersSearchParams>): Promise<JikanResponse<Character[]>>;
}
export type ClubSearchType = "public" | "private" | "secret";
export type ClubSearchCategory = "anime" | "manga" | "actors_and_artists" | "characters" | "cities_and_neighborhoods" | "companies" | "conventions" | "games" | "japan" | "music" | "other" | "schools";
export type ClubSearchOrder = "mal_id" | "name" | "members_count" | "created";
export type ClubSearchParams = {
page: number;
limit: number;
q: string;
type: ClubSearchType;
category: ClubSearchCategory;
order_by: ClubSearchOrder;
sort: SortOptions;
letter: string;
};
export type Club = {
mal_id: number;
name: string;
url: string;
images: JikanImages;
members: number;
category: string;
created: string;
access: string;
};
export type ClubMember = {
username: string;
url: string;
images: JikanImages;
};
export type ClubStaff = {
url: string;
username: string;
};
export type ClubRelations = {
anime: RelationEntry[];
manga: RelationEntry[];
characters: RelationEntry[];
};
/**
* **Club Client**
*
* Client used to access the Club Endpoints.
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class ClubsClient extends BaseClient {
/**
* @returns Club resource
* @param id Club ID
*/
getClubsById(id: number): Promise<JikanResponse<Club>>;
/**
* @returns Club members resource
* @param id Club ID
* @param params
*/
getClubMembers(id: number, params?: Partial<{
page: number;
}>): Promise<JikanResponse<ClubMember[]>>;
/**
* @returns Club staff
* @param id Club ID
*/
getClubStaff(id: number): Promise<JikanResponse<ClubStaff[]>>;
/**
* @returns Club relations
* @param id Club ID
*/
getClubRelations(id: number): Promise<JikanResponse<ClubRelations>>;
/**
* @returns Search results for Clubs
* @param params
*/
getClubSearch(params?: Partial<ClubSearchParams>): Promise<JikanResponse<Club[]>>;
}
/**
* **Genres Client**
*
* Client used to access the Genres Endpoints:
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class GenresClient extends BaseClient {
/**
* Get Anime genres
* @param filter Type of the desired genres
*/
getAnimeGenres(filter?: GenresFilter): Promise<JikanResponse<Genre[]>>;
/**
* Get Manga genres
* @param filter Type of the desired genres
*/
getMangaGenres(filter?: GenresFilter): Promise<JikanResponse<Genre[]>>;
}
export type Magazine = {
mal_id: number;
name: string;
url: string;
count: number;
};
export type MagazineSearchOrder = "mal_id" | "name" | "count";
export type MagazineSearchParams = {
page: number;
limit: number;
q: string;
order_by: MagazineSearchOrder;
sort: SortOptions;
letter: string;
};
export declare class MagazinesClient extends BaseClient {
/**
* @returns Magazines collection
* @param params
*/
getMagazines(params?: Partial<MagazineSearchParams>): Promise<JikanResponse<Magazine[]>>;
}
/**
* **Manga Client**
*
* Client used to access the Manga Endpoints:
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class MangaClient extends BaseClient {
/**
* Get a Manga with full information by its ID
* @param id The Manga ID
*/
getMangaFullById(id: number): Promise<JikanResponse<Manga>>;
/**
* Get a Manga by its ID
* @param id The Manga ID
*/
getMangaById(id: number): Promise<JikanResponse<Manga>>;
/**
* Get Characters of a specific Manga
* @param id The Manga ID
*/
getMangaCharacters(id: number): Promise<JikanResponse<CommonCharacter[]>>;
/**
* Get a list of manga news
* @param id The Manga ID
*/
getMangaNews(id: string): Promise<JikanResponse<JikanNews[]>>;
/**
* Get a list og manga forum topics
* @param id The manga ID
* @param filter Filter topics
*/
getMangaTopics(id: string, filter?: ForumFilter): Promise<JikanResponse<JikanForum[]>>;
/**
* Get Pictures related to a specific Manga
* @param id The Manga ID
*/
getMangaPictures(id: number): Promise<JikanResponse<JikanImages[]>>;
/**
* Get Statistics related to a specific Manga
* @param id The Manga ID
*/
getMangaStatistics(id: number): Promise<JikanResponse<MangaStatistics>>;
/**
* Get more info related to the manga
* @param id manga id
*/
getMangaMoreInfo(id: number): Promise<JikanResponse<JikanMoreInfo>>;
/**
* Get Recommendations related to a specific Manga
* @param id The Manga ID
*/
getMangaRecommendations(id: number): Promise<JikanResponse<Recommendation[]>>;
/**
* Get anime Relations
* @param id manga id
*/
getMangaRelations(id: number): Promise<JikanResponse<JikanRelation[]>>;
/**
* Get manga external links
* @param id manga id
*/
getMangaExternal(id: number): Promise<JikanResponse<JikanExternalLink[]>>;
/**
* Get all the filtered Mangas. Returns all the Mangas if no filters are given.
* @param searchParams Filter parameters
*/
getMangaSearch(searchParams?: Partial<MangaSearchParams>): Promise<JikanResponse<Manga[]>>;
}
/**
* **Random Client**
*
* Client used to access the Random Endpoints:
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class RandomClient extends BaseClient {
/**
* Get random anime
*/
getRandomAnime(): Promise<JikanResponse<Anime>>;
/**
* Get random manga
*/
getRandomManga(): Promise<JikanResponse<Manga>>;
/**
* Get random character
*/
getRandomCharacters(): Promise<JikanResponse<Character>>;
}
/**
* **Schedules Client**
*
* Client used to access the Schedules Endpoints
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class SchedulesClient extends BaseClient {
/**
* Returns weekly schedule
* @param searchParams Filter parameters
*/
getSchedules(searchParams?: Partial<SchedulesParams>): Promise<JikanResponse<Anime[]>>;
}
/**
* **Seasons Client**
*
* Client used to access the Seasons Endpoints
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class SeasonsClient extends BaseClient {
/**
* Get the seasonal anime by year and season
* @param year Season year
* @param season Season value
* @param searchParams Filter parameters
*/
getSeason(year: number, season: AnimeSeason, searchParams?: Partial<JikanSeasonsParams>): Promise<JikanResponse<Anime[]>>;
/**
* Get current seasonal anime
* @param searchParams Filter parameters
*/
getSeasonNow(searchParams?: Partial<SeasonNowParams>): Promise<JikanResponse<Anime[]>>;
/**
* Get available list of seasons
*/
getSeasonsList(): Promise<JikanResponse<SeasonsListData[]>>;
/**
* Get upcoming season's anime
* @param searchParams Filter parameters
*/
getSeasonUpcoming(searchParams?: Partial<JikanSeasonsParams>): Promise<JikanResponse<Anime[]>>;
}
/**
* **Top Client**
*
* Client used to access the Top Endpoints:
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class TopClient extends BaseClient {
/**
* Get the top Animes
* @param searchParams Filter parameters
*/
getTopAnime(searchParams?: Partial<AnimeTopParams>): Promise<JikanResponse<Anime[]>>;
/**
* Get the top Mangas
* @param searchParams Filter parameters
*/
getTopManga(searchParams?: Partial<MangaTopParams>): Promise<JikanResponse<Manga[]>>;
/**
* Get the top Characters
* @param searchParams Filter parameters
*/
getTopCharacters(searchParams?: Partial<JikanTopParams>): Promise<JikanResponse<Character[]>>;
}
export type WatchEpisode = {
entry: EpisodeEntry;
episodes: {
mal_id: string;
url: string;
title: string;
premium: boolean;
}[];
region_locked: boolean;
};
export type WatchEpisodePromo = AnimePromoVideo & {
entry: EpisodeEntry;
};
export type EpisodeEntry = {
mal_id: number;
url: string;
images: JikanImages;
title: string;
};
/**
* **Watch Client**
* Client used to access the Watch Endpoint:
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class WatchClient extends BaseClient {
/**
* @returns Recently added episodes
*/
getWatchRecentEpisodes(): Promise<JikanResponse<WatchEpisode[]>>;
/**
* @returns Recently Popular episodes
*/
getWatchPopularEpisodes(): Promise<JikanResponse<WatchEpisode[]>>;
/**
* @returns Recently added promotional videos
*/
getWatchRecentPromos(params?: Partial<{
page: number;
}>): Promise<JikanResponse<WatchEpisodePromo[]>>;
/**
* @returns Popular promotional videos
*/
getWatchPopularPromos(): Promise<JikanResponse<WatchEpisodePromo[]>>;
}
/**
* **Jikan Client**
*
* The main client used to access all the Jikan Endpoints:
*
* See also: [Jikan Documentation](https://docs.api.jikan.moe/)
*/
export declare class JikanClient {
anime: AnimeClient;
characters: CharactersClient;
clubs: ClubsClient;
genres: GenresClient;
magazines: MagazinesClient;
manga: MangaClient;
top: TopClient;
schedules: SchedulesClient;
seasons: SeasonsClient;
random: RandomClient;
watch: WatchClient;
constructor(clientOptions?: Partial<ClientArgs>);
}
export declare const handleRequest: (requestConfig: InternalCacheRequestConfig) => InternalCacheRequestConfig;
export declare const handleRequestError: (error: AxiosError) => Promise<AxiosError>;
export declare const handleResponse: (response: CacheAxiosResponse) => CacheAxiosResponse;
export declare const handleResponseError: (error: AxiosError) => Promise<AxiosError>;
export declare const AnimeEndpoints: {
readonly animeFullById: "/anime/{id}/full";
readonly animeById: "/anime/{id}";
readonly animeCharacters: "/anime/{id}/characters";
readonly animeStaff: "/anime/{id}/staff";
readonly animeEpisodes: "/anime/{id}/episodes";
readonly animeEpisodeById: "/anime/{id}/episodes/{episode}";
readonly animeNews: "/anime/{id}/news";
readonly animeForum: "/anime/{id}/forum";
readonly animeVideos: "/anime/{id}/videos";
readonly animeVideosEpisodes: "/anime/{id}/videos/episodes";
readonly animePictures: "/anime/{id}/pictures";
readonly animeStatistics: "/anime/{id}/statistics";
readonly animeMoreInfo: "/anime/{id}/moreinfo";
readonly animeRecommendations: "/anime/{id}/recommendations";
readonly animeUserUpdates: "/anime/{id}/userupdates";
readonly animeReviews: "/anime/{id}/reviews";
readonly animeRelations: "/anime/{id}/relations";
readonly animeThemes: "/anime/{id}/themes";
readonly animeExternal: "/anime/{id}/external";
readonly animeStreaming: "/anime/{id}/streaming";
readonly animeSearch: "/anime";
};
export declare const CharactersEndpoints: {
readonly characterFullById: "/characters/{id}/full";
readonly characterById: "/characters/{id}";
readonly characterAnime: "/characters/{id}/anime";
readonly charactersManga: "/characters/{id}/manga";
readonly characterVoiceActors: "/characters/{id}/voices";
readonly characterPictures: "/characters/{id}/pictures";
readonly characterSearch: "/characters";
};
export declare const ClubsEndpoints: {
readonly clubById: "/clubs/{id}";
readonly clubMembers: "/clubs/{id}/members";
readonly clubStaff: "/clubs/{id}/staff";
readonly clubRelations: "/clubs/{id}/relations";
readonly clubSearch: "/clubs";
};
export declare const GenresEndpoints: {
readonly animeGenres: "/genres/anime";
readonly mangaGenres: "/genres/manga";
};
export declare const MagazinesEndpoints: {
readonly magazines: "/magazines";
};
export declare const MangaEndpoints: {
readonly mangaSearch: "/manga";
readonly mangaFullById: "/manga/{id}/full";
readonly mangaById: "/manga/{id}";
readonly mangaCharacters: "/manga/{id}/characters";
readonly mangaNews: "manga/{id}/news";
readonly mangaTopics: "/manga/{id}/forum";
readonly mangaPictures: "/manga/{id}/pictures";
readonly mangaStatistics: "/manga/{id}/statistics";
readonly mangaMoreInfo: "/manga/{id}/moreinfo";
readonly mangaRelations: "manga/{id}/relations";
readonly mangaExternal: "/manga/{id}/external";
readonly mangaRecommendations: "/manga/{id}/recommendations";
};
export declare const SeasonsEndpoints: {
readonly season: "/seasons/{year}/{season}";
readonly seasonNow: "/seasons/now";
readonly seasonsList: "/seasons";
readonly seasonUpcoming: "/seasons/upcoming";
};
export declare const TopEndpoints: {
readonly topAnime: "/top/anime";
readonly topManga: "/top/manga";
readonly topCharacters: "/top/characters";
};
export declare const RandomEndpoints: {
readonly randomAnime: "/random/anime";
readonly randomManga: "/random/manga";
readonly randomCharacters: "/random/characters";
};
export declare const WatchEndpoints: {
readonly watchRecentEpisodes: "/watch/episodes";
readonly watchPopularEpisodes: "/watch/episodes/popular";
readonly watchRecentPromos: "/watch/promos";
readonly watchPopularPromos: "/watch/promos/popular";
};
export declare const BASE_URL = "https://api.jikan.moe/v4";
export {};