-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
*.tgz | ||
yarn-error.log |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { ANIME, BOOKS, COMICS } from './providers'; | ||
import { PROVIDERS_LIST } from './utils/providers-list'; | ||
export { ANIME, BOOKS, COMICS }; | ||
export { PROVIDERS_LIST }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { BaseParser } from '.'; | ||
declare abstract class AnimeParser extends BaseParser { | ||
/** | ||
* takes anime link or id | ||
* | ||
* returns anime info | ||
*/ | ||
protected abstract fetchAnimeInfo(animeUrl: string): Promise<unknown>; | ||
/** | ||
* takes episode id | ||
* | ||
* returns episode sources (video links) | ||
*/ | ||
protected abstract fetchEpisodeSources(episodeId: string, ...args: any): Promise<unknown>; | ||
/** | ||
* takes episode link | ||
* | ||
* returns episode servers (video links) available | ||
*/ | ||
protected abstract fetchEpisodeServers(episodeLink: string): Promise<unknown>; | ||
} | ||
export default AnimeParser; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { BaseProvider } from '.'; | ||
declare abstract class BaseParser extends BaseProvider { | ||
/** | ||
* Search for books/anime/manga/etc using the given query | ||
* | ||
* returns a promise resolving to a data object | ||
*/ | ||
protected abstract search(query: string, ...args: any[]): Promise<unknown>; | ||
} | ||
export default BaseParser; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { IProviderStats } from '.'; | ||
declare abstract class BaseProvider { | ||
/** | ||
* Name of the provider | ||
*/ | ||
abstract readonly name: string; | ||
/** | ||
* The main URL of the provider | ||
*/ | ||
protected abstract readonly baseUrl: string; | ||
/** | ||
* Most providers are english based, but if the provider is not english based override this value | ||
*/ | ||
protected readonly languages: string[] | string; | ||
/** | ||
* override as `true` if the provider **only** supports NSFW content | ||
*/ | ||
readonly isNSFW: boolean; | ||
/** | ||
* Logo of the provider (used in the website) or `undefined` if not available. ***128x128px is preferred***\ | ||
* Must be a valid URL (not a data URL) | ||
*/ | ||
protected abstract readonly logo: string; | ||
/** | ||
* The class's path is determined by the provider's directory structure for example:\ | ||
* MangaDex class path is `MANGA.all.MangaDex`. **(case sensitive)** | ||
*/ | ||
protected abstract readonly classPath: string; | ||
/** | ||
* override as `false` if the provider is **down** or **not working** | ||
*/ | ||
readonly isWorking: boolean; | ||
/** | ||
* returns provider stats | ||
*/ | ||
get toString(): IProviderStats; | ||
} | ||
export default BaseProvider; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export interface Book { | ||
title: string; | ||
authors: string[]; | ||
publisher: string; | ||
year: string; | ||
edition: string; | ||
volume: string; | ||
series: string; | ||
isbn: string[]; | ||
link: string; | ||
} | ||
export interface Hashes { | ||
AICH: string; | ||
CRC32: string; | ||
eDonkey: string; | ||
MD5: string; | ||
SHA1: string; | ||
SHA256: string[]; | ||
TTH: string; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { BaseParser } from '.'; | ||
declare abstract class BookParser extends BaseParser { | ||
} | ||
export default BookParser; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { BaseParser } from '.'; | ||
declare abstract class ComicParser extends BaseParser { | ||
} | ||
export default ComicParser; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import BaseProvider from './base-provider'; | ||
import BaseParser from './base-parser'; | ||
import AnimeParser from './anime-parser'; | ||
import BookParser from './book-parsers'; | ||
import ComicParser from './comic-parser'; | ||
import VideoExtractor from './video-extractor'; | ||
import MangaParser from './manga-parser'; | ||
import LightNovelParser from './lightnovel-parser'; | ||
import { IProviderStats, IAnimeSearch, IAnimeEpisode, IAnimeInfo, IAnimeResult, IEpisodeServer, IVideo, LibgenBook, StreamingServers, AnimeStatus, SubOrSub, IMangaResult, IMangaSearch, IMangaChapter, IMangaInfo, ILightNovelResult, ILightNovelSearch, ILightNovelInfo, ILightNovelChapter, ILightNovelChapterContent, GetComicsComics, ComicRes } from './types'; | ||
import { LibgenBookObject, GetComicsComicsObject } from './type-objects'; | ||
export { BaseProvider, IProviderStats, BaseParser, AnimeParser, BookParser, IAnimeSearch, IAnimeEpisode, IAnimeInfo, IAnimeResult, IEpisodeServer, IVideo, VideoExtractor, LibgenBook, LibgenBookObject, StreamingServers, AnimeStatus, SubOrSub, LightNovelParser, MangaParser, IMangaResult, IMangaSearch, IMangaChapter, IMangaInfo, ILightNovelResult, ILightNovelSearch, ILightNovelInfo, ILightNovelChapter, ILightNovelChapterContent, ComicParser, GetComicsComics, GetComicsComicsObject, ComicRes, }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { BaseParser } from '.'; | ||
declare abstract class LighNovelParser extends BaseParser { | ||
/** | ||
* takes light novel link or id | ||
* | ||
* returns lightNovel info | ||
*/ | ||
protected abstract fetchLighNovelInfo(lightNovelUrl: string, ...args: any): Promise<unknown>; | ||
/** | ||
* takes chapter id | ||
* | ||
* returns chapter content (text) | ||
*/ | ||
protected abstract fetchChapterContent(chapterId: string, ...args: any): Promise<unknown>; | ||
} | ||
export default LighNovelParser; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { BaseParser } from '.'; | ||
declare abstract class MangaParser extends BaseParser { | ||
/** | ||
* takes manga link or id | ||
* | ||
* returns manga info with chapters | ||
*/ | ||
protected abstract fetchMangaInfo(mangaUrl: string): Promise<unknown>; | ||
/** | ||
* takes chapter id | ||
* | ||
* returns chapter (image links) | ||
*/ | ||
protected abstract fetchChapterPages(chapterId: string, ...args: any): Promise<unknown>; | ||
} | ||
export default MangaParser; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Hashes } from './base-types'; | ||
import { GetComicsComics, LibgenBook } from './types'; | ||
export declare class LibgenBookObject implements LibgenBook { | ||
title: string; | ||
authors: never[]; | ||
publisher: string; | ||
year: string; | ||
edition: string; | ||
volume: string; | ||
series: string; | ||
isbn: never[]; | ||
link: string; | ||
id: string; | ||
language: string; | ||
format: string; | ||
size: string; | ||
pages: string; | ||
image: string; | ||
description: string; | ||
tableOfContents: string; | ||
topic: string; | ||
hashes: HashesObject; | ||
} | ||
declare class HashesObject implements Hashes { | ||
AICH: string; | ||
CRC32: string; | ||
eDonkey: string; | ||
MD5: string; | ||
SHA1: string; | ||
SHA256: never[]; | ||
TTH: string; | ||
} | ||
export declare class GetComicsComicsObject implements GetComicsComics { | ||
image: string; | ||
title: string; | ||
year: string; | ||
size: string; | ||
excerpt: string; | ||
description: string; | ||
download: string; | ||
category: string; | ||
ufile: string; | ||
mega: string; | ||
mediafire: string; | ||
zippyshare: string; | ||
readOnline: string; | ||
} | ||
export {}; |