Skip to content

Commit

Permalink
feat(anix): add fetch episode sources and servers
Browse files Browse the repository at this point in the history
  • Loading branch information
hase0278 committed Dec 2, 2024
1 parent 04bcde4 commit 179e65b
Show file tree
Hide file tree
Showing 12 changed files with 317 additions and 23 deletions.
2 changes: 1 addition & 1 deletion dist/models/anime-parser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ declare abstract class AnimeParser extends BaseParser {
*
* returns episode servers (video links) available
*/
abstract fetchEpisodeServers(episodeId: string): Promise<IEpisodeServer[]>;
abstract fetchEpisodeServers(episodeId: string, ...args: any): Promise<IEpisodeServer[]>;
}
export default AnimeParser;
4 changes: 3 additions & 1 deletion dist/models/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export declare enum MediaFormat {
MANGA = "MANGA",
NOVEL = "NOVEL",
ONE_SHOT = "ONE_SHOT",
PV = "PV"
PV = "PV",
COMIC = "COMIC"
}
export interface IAnimeInfo extends IAnimeResult {
malId?: number | string;
Expand Down Expand Up @@ -165,6 +166,7 @@ export declare enum StreamingServers {
MyCloud = "mycloud",
Filemoon = "filemoon",
VidStreaming = "vidstreaming",
VidStream = "vidstream",
SmashyStream = "smashystream",
StreamHub = "streamhub",
StreamWish = "streamwish",
Expand Down
2 changes: 2 additions & 0 deletions dist/models/types.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/models/types.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions dist/providers/anime/anix.d.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
import { AnimeParser, ISearch, IAnimeInfo, IAnimeResult, ISource, IEpisodeServer } from '../../models';
import { AnimeParser, ISearch, IAnimeInfo, IAnimeResult, ISource, IEpisodeServer, StreamingServers, ProxyConfig } from '../../models';
import { AxiosAdapter } from 'axios';
declare class Anix extends AnimeParser {
readonly name = "Anix";
protected baseUrl: string;
protected logo: string;
protected classPath: string;
private readonly requestedWith;
constructor(customBaseURL?: string, proxy?: ProxyConfig, adapter?: AxiosAdapter);
/**
* @param page page number (optional)
* @param type type of media. (optional) (default `1`) `1`: Japanese with subtitles, `2`: english/dub with no subtitles, `3`: chinese with english subtitles
*/
fetchRecentEpisodes: (page?: number) => Promise<ISearch<IAnimeResult>>;
/**
* @param query Search query
* @param page Page number (optional)
*/
search: (query: string, page?: number) => Promise<ISearch<IAnimeResult>>;
/**
* @param id Anime id
* @param page Page number
*/
fetchAnimeInfo: (id: string) => Promise<IAnimeInfo>;
/**
*
* @param id Anime id
* @param episodeId Episode id
* @param server Streaming server(optional)
*/
fetchEpisodeSources: (episodeId: string) => Promise<ISource>;
fetchEpisodeSources: (id: string, episodeId: string, server?: StreamingServers) => Promise<ISource>;
/**
*
* @param id Anime id
* @param episodeId Episode id
*/
fetchEpisodeServers: (episodeId: string) => Promise<IEpisodeServer[]>;
fetchEpisodeServers: (id: string, episodeId: string) => Promise<IEpisodeServer[]>;
}
export default Anix;
144 changes: 137 additions & 7 deletions dist/providers/anime/anix.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 179e65b

Please sign in to comment.