mta-wiki-parser
Version:
Wiki to Discord parser for Multi Theft Auto Wiki: https://wiki.multitheftauto.com/
25 lines (24 loc) • 647 B
TypeScript
export interface IFetchedArticle {
title: string;
url: string;
id: number;
categories: string[];
templates: string[];
image: string | false;
rawText: string;
sections: IFetchedSection[];
}
export interface IFetchedSection {
toclevel: number;
level: number;
line: string;
number: number;
index: number;
fromtitle: string;
byteoffset: number;
anchor: string;
}
export declare class Fetcher {
static fetch(query: string, userAgent?: string): Promise<IFetchedArticle>;
static getImageUrl(imageName: string, userAgent?: string): Promise<string | false>;
}