UNPKG

xenforo-dl

Version:
41 lines 1.28 kB
import Logger, { LogLevel } from './logging/Logger.js'; export interface DownloadAttachmentParams { src: string; dest: string; maxRetries: number; retryInterval: number; signal?: AbortSignal; } export interface StartDownloadOverrides { destFilePath?: string; tmpFilePath?: string; } export declare class FetcherError extends Error { url: string; fatal: boolean; constructor(message: string, url: string, fatal?: boolean); } export default class Fetcher { #private; name: string; constructor(logger?: Logger | null, cookie?: string | null); static getInstance(logger?: Logger | null, cookie?: string | null): Promise<Fetcher>; fetchHTML(args: { url: string; maxRetries: number; retryInterval: number; signal?: AbortSignal; }, rt?: number): Promise<{ html: string; lastURL: string; }>; fetchFilenameByHeaders(args: { url: string; maxRetries: number; retryInterval: number; signal?: AbortSignal; }, rt?: number): Promise<string | null>; downloadAttachment(params: DownloadAttachmentParams, rt?: number): Promise<void>; protected log(level: LogLevel, ...msg: Array<any>): void; } //# sourceMappingURL=Fetcher.d.ts.map