UNPKG

wiki-saikou

Version:

The library provides the out of box accessing to MediaWiki API in both browsers & Node.js, and the syntax is very similar to vanilla `new mw.Api()`. TypeScript definition included~

22 lines (21 loc) 660 B
export type MwApiParams = Record<string, string | number | string[] | undefined | boolean | File | Blob>; export type MwTokenName = 'createaccount' | 'csrf' | 'login' | 'patrol' | 'rollback' | 'userrights' | 'watch'; export type MwApiResponse<T = any> = T & { batchcomplete?: string; continue?: { [key: string]: string; continue: string; }; limits?: Record<string, number>; error?: MwApiResponseError; errors?: MwApiResponseError[]; warnings?: Record<string, { warnings: string; }>; }; export interface MwApiResponseError { code: string; text: string; module?: string; docref?: string; }