UNPKG

@ablanc/crunchyroll

Version:

Node.js module to scrape crunchyroll website.

30 lines (29 loc) 1.02 kB
import { seasonArg } from "./types/seasons"; import { genreArg } from "./types/genres"; interface AnimeInfos { link: string; img: string; name: string; episodes: number; ref: "crunchyroll"; } interface AnimeArgs { page?: number; length?: number; } interface AnimeArgsWithTags extends AnimeArgs { tags: genreArg[] | genreArg; } interface AnimeArgsWithSeason extends AnimeArgs { season: seasonArg; } declare type getAnimeFn = (data?: AnimeArgs) => Promise<AnimeInfos[]>; declare type getByGenreFn = (data?: AnimeArgsWithTags) => Promise<AnimeInfos[]>; declare type getBySeasonFn = (data?: AnimeArgsWithSeason) => Promise<AnimeInfos[]>; export declare const getPopularAnime: getAnimeFn; export declare const getSimulcastsAnime: getAnimeFn; export declare const getByGenresAnime: getByGenreFn; export declare const getBySeasonAnime: getBySeasonFn; export declare const getMostRecentsAnime: getAnimeFn; export declare const getByAlphaNum: (letter: string) => Promise<AnimeInfos[]>; export {};