flibusta
Version:
Unofficial Flibusta API based on website search engine. If you like to read books - buy
23 lines (22 loc) • 1.31 kB
TypeScript
import { AxiosInstance } from 'axios';
import { SearchOpdsPagesInformation } from '@localTypes/searchOpdsResult';
import { Nullable } from '@localTypes/generals';
import { OpdsEntry, OpdsSearchResult } from '@localTypes/opdsSearchResult';
import { SearchBooksByNameOpdsResult } from '@localTypes/searchBooksByNameOpdsResult';
declare class FlibustaOpdsApiHelper {
private static FlibustaFileMIMETypesToDownload;
private static getAuthorsFromOpdsEntry;
private static getCategoriesFromOpdsEntry;
private static getCoverFromLink;
private static getDownloadsItemList;
axiosInstance: AxiosInstance;
protected constructor(axiosController: AxiosInstance);
private prepareResponseFromOpdsObjectEntry;
prepareResponseFromOpdsEntry(entry: Array<OpdsEntry> | OpdsEntry): Array<SearchBooksByNameOpdsResult>;
getTotalPagesCount(totalResults: number, itemsPerPage: number): number;
hasNextPage(feedLink: OpdsSearchResult['feed']['link']): boolean;
hasPreviousPage(currentPageIndex: OpdsSearchResult['feed']['os:startIndex']): boolean;
getCurrentOpdsPageInformation(feed: OpdsSearchResult['feed'], currentPageIndex: number): SearchOpdsPagesInformation;
getFlibustaOpdsEntry(url: string): Promise<Nullable<OpdsSearchResult>>;
}
export default FlibustaOpdsApiHelper;