Wikipedia:AutoWikiBrowser/API migration
Appearance
- Home
Introduction and rules - User manual
How to use AWB - Discussion
Discuss AWB, report errors, and request features - User tasks
Request or help with AWB-able tasks - Technical
Technical documentation
Migration to Bot API specs
Rationale
- Easier, uniform access to wiki using XML, much less prone to break in case of changes than plain HTML
- Potentially much faster, should save bandwidth considerably
- Would allow to minimise WebBrowser usage - less bugs, faster processing due to elimination of in-place DOM magic; also should make AWB much more portable (I suppose that Mono supports the basic WebBrowser crap we need to display previews and diffs - MaxSem)
Current write API status
Horribly immature: not tested widely enough, not fully reviewed security-wise, not enabled on any Wikimedia projects other than testwiki, even the older query functions are still subject to breaking changes.
We cannot release even a beta until it's enabled everywhere and included in a quarterly MW release, signifying some level of stability. (At least four to six months from now? - MaxSem)
Current progress on AWB side
5% - only a non-functional skeleton of ApiEdit class and this spec.
Things to be done
I assume that API editing should be made available as of version 5.0.
- Development should be continued as usual
- ApiEdit should be finished and maintained
- Support for nested exceptions should be added to ErrorHandler.
- We could test API further right now by swithching to API-based previews, for example
- Political choice: session persistance
- We should probably store cookies, just like IE does in our current scheme
- Or make AWB completely profile-dependant?
- And move profiles away from registry?
- Storing where is safer?
- And encrypt profiles with a master password?
- Normalise API usage in GetLists, by making it completely dependant on ApiEdit to retrieve data from the site and check the results for errors
- Write a thread-based wrapper for ApiEdit to use in interface
- Kill WebControl with fire
- Phase out the old editor class, probaly not worth deleting it
- Make a branch of old-style AWB for usage by people from third-party wikis running older versions of MW. This branch shouldn't be able to edit Wikimedia sites. As such, we don't need it to follow the version checkpage. Its ErrorHandler shouldn't advice people to post every exception to WP:AWB/B, too.
- Release 5.0 and prepare enough vaseline when people will start reporting bizarre bugs o_0
Implementation details
- Editing classes
- Don't use those dreaded singletons like WikiFunctions.Variables, they're hopelessly screwed up. Also, people should be able to reuse ApiEdit without having long sexual intecourse with AWB-specific stuff. Remember, Variables constructor can be called from zillion places without you even noticing this.