diff --git a/src/category.ts b/src/category.ts index 4bb29f5..fff7f91 100644 --- a/src/category.ts +++ b/src/category.ts @@ -61,8 +61,7 @@ export default function (bot: Mwn) { /** @inheritDoc */ members(options?: ApiQueryCategoryMembersParams): Promise { return bot - .request({ - action: 'query', + .query({ list: 'categorymembers', cmtitle: 'Category:' + this.title, cmlimit: 'max', diff --git a/src/file.ts b/src/file.ts index 57667dd..22ba33f 100644 --- a/src/file.ts +++ b/src/file.ts @@ -1,4 +1,4 @@ -import type { Mwn, MwnPage, MwnTitle } from './bot'; +import type { Mwn, MwnPage, MwnTitle, ReverseLinkTarget } from './bot'; import { ApiQueryBacklinkspropParams } from './api_params'; export interface MwnFileStatic { @@ -74,12 +74,11 @@ export default function (bot: Mwn) { } /** @inheritDoc */ - usages(options?: ApiQueryBacklinkspropParams): Promise<{ pageid: number; title: string; redirect: boolean }[]> { + usages(options?: ApiQueryBacklinkspropParams): Promise { return bot - .request({ - action: 'query', - prop: 'fileusage', + .query({ titles: this.toString(), + prop: 'fileusage', fuprop: 'pageid|title|redirect', ...options, })