Skip to content

Commit

Permalink
readme: fix wrong documentation on OAuth usage
Browse files Browse the repository at this point in the history
siddharthvp committed Mar 8, 2021
1 parent 9ba9d68 commit 9cf6e37
Showing 3 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -168,10 +168,12 @@ const bot = await mwn.init({

// Instead of username and password, you can use OAuth 1.0a to authenticate,
// if the wiki has Extension:OAuth enabled
oauth_consumer_token: "16_DIGIT_ALPHANUMERIC_KEY",
oauth_consumer_secret: "20_DIGIT_ALPHANUMERIC_KEY",
oauth_access_token: "16_DIGIT_ALPHANUMERIC_KEY",
oauth_access_secret: "20_DIGIT_ALPHANUMERIC_KEY",
OAuthCredentials: {
consumerToken: "16_DIGIT_ALPHANUMERIC_KEY",
consumerSecret: "20_DIGIT_ALPHANUMERIC_KEY",
accessToken: "16_DIGIT_ALPHANUMERIC_KEY",
accessSecret: "20_DIGIT_ALPHANUMERIC_KEY"
},

// Set your user agent (required for WMF wikis, see https://meta.wikimedia.org/wiki/User-Agent_policy):
userAgent: 'myCoolToolName 1.0 ([[link to bot user page or tool documentation]])',
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mwn",
"version": "0.10.2",
"version": "0.10.3",
"description": "JavaScript & TypeScript MediaWiki bot framework for Node.js",
"main": "./build/bot.js",
"types": "./build/bot.d.ts",

0 comments on commit 9cf6e37

Please sign in to comment.