UNPKG

mwoffliner

Version:
18 lines (17 loc) 1.26 kB
import Downloader from '../Downloader.js'; export declare function getArticlesByIds(articleIds: string[], downloader: Downloader, log?: boolean): Promise<void>; export declare function getArticlesByNS(ns: number, downloader: Downloader, articleIdsToIgnore?: string[], continueLimit?: number): Promise<void>; export declare function normalizeMwResponse(response: MwApiQueryResponse): QueryMwRet; export declare function mwRetToArticleDetail(obj: QueryMwRet): KVS<ArticleDetail>; /** * Check for API availability at the given URL. * * @param downloader Downloader class handling web requests * @param url The URL to check. * @param loginCookie A string representing a cookie for login, if necessary. * @param allowedMimeTypes An array of allowed mime types for the response. If this is set, the check is only considered a * success if the response has a mime type in this array. Set to null to disable this filter. * @returns Promise resolving to true if the API is available. */ export declare function checkApiAvailability(downloader: Downloader, url: string, allowedMimeTypes?: any): Promise<boolean>; export declare function getArticleIds(downloader: Downloader, mainPage?: string, articleIds?: string[], articleIdsToIgnore?: string[]): Promise<void>;