mediawiktory
mediawiktory copied to clipboard
Token management
All data-modifying actions require some dance with "tokens". It should be done transparently for user. See https://www.mediawiki.org/wiki/API:Tokens
Note, that token management have different behavior in:
- versions < 1.20
- version 1.20-1.23
- version 1.24+
See also #9 about version compatibility
NB: Current version of "manual" token management is:
token = api.query.meta(:tokens).response.dig('tokens', 'csrftoken')
response = api.edit.title('Wikipedia:Sandbox').text("Test '''me''', MediaWiktory!").token(token).response
It is, in fact, not that bad, and probably not worth over-automatization at all.