Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech
Re: [Mediawiki-api] UploadWizard campaign info API format
 

Index | Next | Previous | View Flat


platonides at gmail

May 17, 2012, 8:36 AM


Views: 163
Permalink
Re: [Mediawiki-api] UploadWizard campaign info API format

On 17/05/12 00:36, Brion Vibber wrote:
> 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>

I don't think it should contain all campaign parameters as a single tag,
as parameters.
Specially evil is the licensesOwnWork="cc-by-sa-3.0|cc-by-3.0|cc-zero".

I'd move it to a format like:
<campaigns>
<campaign>
<id>wlm-es</id>
<name>wlm-es</name>
<licenses>
<ownwork default="cc-by-sa-3.0">
<license>cc-by-sa-3.0</license>
<license>cc-by-3.0</license>
<license>cc-zero</license>
</ownwork>
</licenses>
<fields>
<field>
<name>sdfafsdfd</name>
<initialValue/>
<label/>
<labelPage/>
<maxLength>25</maxLength>
</fields>
<tutorial skip="0">
<template placeholder="$1">Licensing_tutorial_$1.svg</template>
<width>720</width>
<helpdeskCoords x0="27" x1="1319" y1="691" y2="1384" />
</tutorial>
</campaigns>

Not necessariliy like that, some options could get collapsed into
attributes. But not with everything as attributes.

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Subject User Time
Re: [Mediawiki-api] UploadWizard campaign info API format platonides at gmail May 17, 2012, 8:36 AM
    Re: [Mediawiki-api] UploadWizard campaign info API format brion at wikimedia May 20, 2012, 2:10 PM
    Re: [Mediawiki-api] UploadWizard campaign info API format Platonides at gmail May 20, 2012, 2:17 PM
        Re: [Mediawiki-api] UploadWizard campaign info API format jeroendedauw at gmail May 20, 2012, 2:26 PM
        Re: [Mediawiki-api] UploadWizard campaign info API format brion at pobox May 20, 2012, 2:44 PM
    Re: [Mediawiki-api] UploadWizard campaign info API format brion at pobox May 20, 2012, 2:59 PM
    Re: [Mediawiki-api] UploadWizard campaign info API format brion at pobox May 24, 2012, 10:38 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.