UNPKG

flibusta

Version:

Unofficial Flibusta API based on website search engine. If you like to read books - buy

20 lines (19 loc) 1.03 kB
import { AxiosInstance } from 'axios'; import { HTMLElement, Node } from 'node-html-parser'; import Author from '@localTypes/authors'; import FlibustaOpdsApiHelper from '@src/flibustaOpdsApiHelper'; import { PagesInformation } from '@localTypes/pagesInformation'; import { Nullable } from '@localTypes/generals'; declare abstract class FlibustaAPIHelper extends FlibustaOpdsApiHelper { axiosInstance: AxiosInstance; getAuthorBooksRegExp: RegExp; matchOnlyNumbersRegExp: RegExp; protected constructor(axiosController: AxiosInstance); getCurrentPageInformation(parsedHTMLData: HTMLElement): PagesInformation; getFlibustaHTMLPage(url: string): Promise<HTMLElement | null>; getInformationOfBookOrAuthor(node: HTMLElement): Author; getBooksOrTranslations(booksOrTranslations: Array<Node>, regexRule: RegExp): Nullable<number>; getTotalItemsCount(parsedHTMLData: HTMLElement): Nullable<number>; removePagerElements(parsedHTMLData: HTMLElement): HTMLElement; } export default FlibustaAPIHelper;