UNPKG

anigo-anime-api

Version:

Anigo Anime API scrapes data from gogoanime and animixplay

172 lines (170 loc) 6.62 kB
declare module "anigo-anime-api" { interface AnimixAnime { animeTitle: string, animeId: string, mal_id: number, animeImg: string, episodes: null, status: string, score: 8.67, synopsis: string, genres: Array<string>, studios: Array<string>, gogoAnimeLink: Array<{ url: string, title: string}>, animepaheLink: Array<{ url: string, title: string}>, zoroLink: Array<{ url: string, title: string}> } interface AnimixEpisodeInfo { animeTitle: string, mal_id: string, genres: string, status: string, total_episodes: number, extraLinks: null | undefined, episodes: Array<{ epNum: number, link: string}> } interface AnimixRecent { episodeTitle: string, animeId: string, releaseTimeUnix: number, mal_id: number, episodeNum: string, episodes: string, animeImg: string } interface AnimxEpSource { animeId: string, episodeNum: string, sources: Array<{ file: string, type: string}> } interface AllAnime { animeTitle: string, animeId: string } interface AnimixSearch { animeTitle: string, animeId: string, animeImg: string } interface GogoSearch { animeId: string, animeTitle: string, animeUrl: string, animeImg: string, status: string } interface GogoRecent { episodeId: string, animeTitle: string, episodeNum: string, subOrDub: "SUB" | "DUB", animeImg: string, episodeUrl: string } interface GogoAnime { animeTitle: string, type: string, synopsis: string, animeImg: string, releaseDate: string, status: string, genres: Array<string>, otherNames: string, eptotal: string, episodes: Array<{episodeId: string, epNum: string, episodeUrl: string }> } interface GogoEpSource { Referer: string, sources: Array<{ file: string, label: string, type: string }>, sources_bk: Array<{ file: string, label: string, type: string }> } interface ZoroSearch { animeTitle: string, animeId: string, animeImg: string } interface Zoro { animeTitle: string, animeImg: string, synopsis: string, type: string, isDubbed: boolean, totalEpisodes: number, episodes: Array<{ epNum: string, episodeName: string, episodeId: string }> } interface GenreSearch { animeTitle: string, animeId: string, animeImg: string, animeSeason: string, score: number } interface PopularAnime { animeTitle: string, mal_id: string, animeImg: string, views: string, score: number } /** * Get all anime with Animixplay */ function getAllAnime(): Array<AllAnime>; /** * Get anime info from Animixplay */ function getAnimeInfoFromAnimix(malId:string): AnimixAnime; /** * Get anime episodes (from animix's website) */ function getEpisodeInfoFromAnimix(animeId:string): AnimixEpisodeInfo; /** * Get streaming URLs from Animixplay * @deprecated This function is deprecated, use `getGogoanimeEpisodeSource` insead */ function getEpisodeSourceFromAnimix(name:string, epNum:string): AnimxEpSource; /** * Get latest released episodes from Animixplay */ function getRecentEpisodesFromAnimix(): Array<AnimixRecent>; /** * Search Anime from Animixplay */ function searchAnimix(keyw:string): Array<AnimixSearch>; /** * Get anime info from Gogoanime */ function getGogoAnimeInfo(animeId:string): Array<GogoAnime>; /** * Get latest released episodes from Gogoanime */ function getGogoRecentEpisodes(type?:number, page?:number): Array<GogoRecent>; /** * Get streaming URLs from Gogoanime */ function getGogoanimeEpisodeSource(episodeId:string): GogoEpSource; /** * Search Anime with Gogoanime */ function searchGogo(keyw:string, page?:number): Array<GogoSearch>; /** * Search Anime from Zoro */ function searchZoro(keyw:string, page?:number): Array<ZoroSearch>; /** * Get anime info from Zoro */ function getAnimeInfoFromZoro(zoroId:string): Array<Zoro>; /** * Get streaming URLs from Zoro */ function getEpisodeSourceFromZoro(episodeId:string): Array<object>; /** * Get anime by genre */ function searchAnimeByGenre(genre:'Action' | 'Adventure' | 'Anti-Hero' | 'CGDCT' | 'College' | 'Comedy' | 'Drama' | 'Ecchi' | 'Fantasy' | 'Gag Humor' | 'Game' | 'Harem' | 'Historical' | 'Horror' | 'Idol' | 'Isekai' | 'Iyashikei' | 'Josei' | 'Kids' | 'Magical Girl' | 'Martial Arts' | 'Mecha' | 'Military' | 'Movie' | 'Music' | 'Mythology' | 'Mystery' | 'Otaku' | 'Parody' | 'Police' | 'Psychological' | 'Racing' | 'Revenge' | 'Romance' | 'Rural' | 'Samurai' | 'School' | 'Sci-Fi' | 'Seinen' | 'Shoujo' | 'Shoujo Ai' | 'Shounen' | 'Shounen Ai' | 'Slice of Life' | 'Space' | 'Sports' | 'Super Power' | 'Supernatural' | 'Survival' | 'Suspense' | 'Time Travel' | 'Vampire' | 'Work'): Array<GenreSearch>; /** * Get popular anime */ function getPopular(type?:number): Array<PopularAnime>; }