Last modified: 2013-12-06 10:25:06 UTC
I could be missing it, but I'm not seeing how to do this. A hook called sometime before ApiMain::execute() would allow me to add to the list of formatter classes to implement alternative output formats. (I think this would be a cleaner way to implement server-side events than I currently have in https://github.com/worden-lee/cometdemo.)
Rather than a hook, it might be better to do this with a $wgAPIFormatModules global, along the lines of all the other $wgAPI*Modules globals we already have. While I can see how a hook might be useful, if used for adding modules generally it would probably be a performance hit versus the globals.
Change 97926 had a related patch set uploaded by Anomie: API: Add $wgAPIFormatModules https://gerrit.wikimedia.org/r/97926
Change 97926 merged by jenkins-bot: API: Add $wgAPIFormatModules https://gerrit.wikimedia.org/r/97926
patch for global config was merged
$wgAPIFormatModules needs mention in RELEASE-NOTES and documentation at https://www.mediawiki.org/wiki/Manual:$wgAPIFormatModules
Change 99245 had a related patch set uploaded by Anomie: RELEASE-NOTES entry for Ia0bd2531 https://gerrit.wikimedia.org/r/99245
(In reply to comment #5) > $wgAPIFormatModules needs mention in RELEASE-NOTES and documentation at > https://www.mediawiki.org/wiki/Manual:$wgAPIFormatModules Thanks, done.
Change 99245 merged by jenkins-bot: RELEASE-NOTES entry for Ia0bd2531 https://gerrit.wikimedia.org/r/99245
Awesome, thanks!