Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/export_command/wikimedia_function/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
apiUrl: config.get("transferProtocol") as string + config.get('host') + config.get("apiPath")
});
// TODO:
const response: any = await bot.login(userInfo);

Check warning on line 59 in src/export_command/wikimedia_function/bot.ts

View workflow job for this annotation

GitHub Actions / Build and Test (24)

Unexpected any. Specify a different type
if (response.result === 'Success') {
vscode.window.showInformationMessage(`User "${response.lgusername}"(UserID:"${response.lguserid}") Login Result is "${response.result}". Login Token is "${response.token}".`
);
Expand Down Expand Up @@ -131,8 +131,8 @@
meta: Meta.siteInfo,
};

const result: unknown = await tBot.request(args, { method: 'GET' });
const result: unknown = await tBot.request(args);
const re: any = result as any;

Check warning on line 135 in src/export_command/wikimedia_function/bot.ts

View workflow job for this annotation

GitHub Actions / Build and Test (24)

Unexpected any. Specify a different type

Check warning on line 135 in src/export_command/wikimedia_function/bot.ts

View workflow job for this annotation

GitHub Actions / Build and Test (24)

Unexpected any. Specify a different type
// TODO: cast

const generator: string = re.query.general.generator;
Expand Down
8 changes: 4 additions & 4 deletions src/export_command/wikimedia_function/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
meta: 'tokens',
type: 'csrf'
};
const result: unknown = await bot.request(args, { method: 'GET' });
const result: unknown = await bot.request(args);
const reNew: TokensResult = TokensConvert.toResult(result);
const token: string | undefined = reNew.query?.tokens?.csrftoken;
if (token) {
Expand All @@ -47,7 +47,7 @@
action: "tokens",
type: "edit"
};
const result: unknown = await bot.request(args, { method: 'GET' });
const result: unknown = await bot.request(args);
const reOld: OldTokensResult = OldTokensConvert.toResult(result);
const token: string | undefined = reOld.tokens?.edittoken;
if (token) {
Expand Down Expand Up @@ -120,7 +120,7 @@
// if (config.get("redirect")) {
// args['redirect'] = "true";
// }
const result: any = await tBot.request(args, { method: 'POST' });

Check warning on line 123 in src/export_command/wikimedia_function/page.ts

View workflow job for this annotation

GitHub Actions / Build and Test (24)

Unexpected any. Specify a different type
// TODO: Convert
if (result.edit.nochange !== undefined) {
vscode.window.showWarningMessage(
Expand Down Expand Up @@ -253,7 +253,7 @@
const barMessage: vscode.Disposable = vscode.window.setStatusBarMessage("Wikitext: Getting code...");
try {
// get request result
const result: unknown = await tBot.request(args, { method: 'GET' });
const result: unknown = await tBot.request(args);
// console.log(result);
// Convert result as class
const re: ReadPageResult = ReadPageConvert.toResult(result);
Expand Down Expand Up @@ -361,7 +361,7 @@

const tagList: (number | string)[] = [];
for (; ;) {
const result: unknown = await tBot.request(args, { method: 'GET' });
const result: unknown = await tBot.request(args);
const re: TagsResult = TagsConvert.toResult(result);

tagList.push(
Expand Down
2 changes: 1 addition & 1 deletion src/export_command/wikimedia_function/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export async function showViewer(currentPanel: vscode.WebviewPanel | string, vie

const barMessage: vscode.Disposable = vscode.window.setStatusBarMessage("Wikitext: Getting view...");
try {
const result: unknown = await tBot.request(args, { method: 'GET' });
const result: unknown = await tBot.request(args);
const re: GetViewResult = ViewConvert.toResult(result);
if (!re.parse) { return undefined; }

Expand Down
Loading