require 'media_wiki'
api = MediaWiki::Gateway.new 'http://mywiki.com/api.php'
api.login 'Bot account', 'password'
api.edit('Sandbox', 'This is a bot edit', {:bot => true, :summary => 'bot edit'})
api.edit('Sandbox', 'This is not a bot edit', {:summary => 'not bot edit'})
To do this otherwise, you'd need to keep two separate instances of MediaWiki::Gateway around for edits and non-bot edits respectively. This is impractical and annoying, especially when you are writing a bot which needs to leave notifications on user's talk pages (and want these edits to appear in RecentChanges).
This lets you do things like:
To do this otherwise, you'd need to keep two separate instances of
MediaWiki::Gateway
around for edits and non-bot edits respectively. This is impractical and annoying, especially when you are writing a bot which needs to leave notifications on user's talk pages (and want these edits to appear in RecentChanges).