On 06/03/2015 08:07 AM, This, that and the other wrote:
Thanks for thinking of tools like Twinkle!
I wonder why this couldn't be implemented directly as an API action, though.
We considered this (https://phabricator.wikimedia.org/T59989) and decided against it.
Since the internals are different (Flow posts are fully versioned, but they are not 'pages' at the MW core level), we were concerned that the shim would be leaky (responses would be kinda sorta right, but not when you did something deeper, and error responses would probably be even wronger).
So there is of course a public documented API (https://www.mediawiki.org/w/api.php?action=help&modules=flow%20new-topic) for creating new Flow topics, but it is not the same API as for posting sections (nor is there a shim).
That would probably be helpful to bots and non-JS-based tools, as well as to Twinkle itself (since we use our own XML-based MediaWiki API wrapper for consistent error handling and user experience).
For bots, Alexander Jones is working on https://phabricator.wikimedia.org/T67119 to add Flow support to Pywikibot (John Vandenberg and I are mentoring).
Not all bots use Pywikibot, but that should lead the way and other library and bot developers can learn from the solutions implemented there.
No one has an obligation to use MessagePoster. There are other ways to solve the problem (basically, check the content model of the target page then do what you want).
For many developers, I think MessagePoster will be pretty simple. For Twinkle, you'll have to decide whether it can fit into your architecture.
Best,
Matt Flaschen