I'm adding an API module to retrieve UploadWizard upload campaign information, which we need for the upcoming mobile application for Wiki Loves Monuments. Essentially the app will include a very limited implementation of a couple steps of UploadWizard for things like license selection and filling the ID field and description, so we have one consistent set of configuration for both web upload (using UploadWizard) and mobile uploads (using the app).
The change waiting review in gerrit:
https://gerrit.wikimedia.org/r/#/c/7832/
If anybody's got a prime usage in mind for reading UploadWizard campaign data from the API and has recommendations for adjusting the output format (maybe for making the editing view more AJAX-y) please give a shout -- this is not final and we can adjust it.
Currently it'll return XML like this:
<?xml version="1.0"?> <api> <uploadcampaign> <campaigns> <campaign name="wlm-es" id="2" isenabled="0" autoCategories="" autoWikiText="" defaultAlt="" defaultCategories="" defaultDescription="" defaultLat="" defaultLon="" defaultOwnWorkLicence="cc-by-sa-3.0" headerLabelPage="sdfsdf" idField="sdfafsdfd" idFieldInitialValue="" idFieldLabel="" idFieldLabelPage="" idFieldMaxLength="25" licensesOwnWork="cc-by-sa-3.0|cc-by-3.0|cc-zero" ownWorkOption="choice" skipTutorial="" thanksLabelPage="" tutorialHelpdeskCoords="27, 1319, 691, 1384" tutorialTemplate="Licensing_tutorial_$1.svg" tutorialWidth="720" /> </campaigns> </uploadcampaign> </api>-- brion
or JSON like this:
{ "uploadcampaign": { "campaigns": [ { "name": "wlm-es", "id": 2, "isenabled": 0, "autoCategories": "", "autoWikiText": "", "defaultAlt": "", "defaultCategories": "", "defaultDescription": "", "defaultLat": "", "defaultLon": "", "defaultOwnWorkLicence": "cc-by-sa-3.0", "headerLabelPage": "sdfsdf", "idField": "sdfafsdfd", "idFieldInitialValue": "", "idFieldLabel": "", "idFieldLabelPage": "", "idFieldMaxLength": "25", "licensesOwnWork": "cc-by-sa-3.0|cc-by-3.0|cc-zero", "ownWorkOption": "choice", "skipTutorial": "", "thanksLabelPage": "", "tutorialHelpdeskCoords": "27, 1319, 691, 1384", "tutorialTemplate": "Licensing_tutorial_$1.svg", "tutorialWidth": "720" } ] } }