Created
April 16, 2021 23:13
-
-
Save JJPMaster/ca61a71cbe5109e3d73baf607100bb2c to your computer and use it in GitHub Desktop.
Example of MediaWiki API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var params = { | |
action: 'query', | |
list: 'users', | |
ususers: 'JJPMaster', | |
usprop: 'gender|editcount|groups', | |
format: 'json' | |
}, | |
api = new mw.Api(); | |
var users = data.query.users, | |
u; | |
for ( u in users ) { | |
console.log( users[ u ].name + " has " + users[ u ].editcount + " edits."); | |
} | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment