Last modified: 2012-12-13 11:18:09 UTC
Review the API in time for getting closer to deployment.
Results of the review. Close this bug after completion. General * the parameter "usekeys" will be on by default * a parameter "nousekeys" will be added to counter the effect of "usekeys" * the "gettoken" parameter is moved to the "modifyitem" base class, meaning all modifying modules will have access to it getitems module * no further change getitemid module * remove whole module (redundant, same as getitems(prop=) setlanguageattribute module * remove "item" parameter, default to "update" deletelanguageattribute module * remove module (redundant, same as setlanguageattribute(label=) getsitelinks * remove module (redundant, same as getitems(prop=sitelinks) linksite * rename to wbsetsitelink * remove "item" parameter, default to "update", not "set" as it is now * remove "link" parameter, default to "set", not "add" as it is now setaliases * remove "item" parameter, default to "update" setitem * remove "languages" parameter * remove "item" parameter, default to "add" (!) * update description that for now data can only be an empty object {}, and that this call will create a new item and return the id. anything else is undocumented for now. new module: wblinktitles * two parameters: from, to (both with site and title) * if from exists and to exists: ** if item(from) = item(to) : do nothing else raise error * if from exists and to not exists: ** setsitelink(from,to) * if from not exists and to exists: ** setsitelink(to,from) * if from not exists and to not exists: ** id = createidem ** setsitelink(id, from) ** setsitelink(id, to)
Picked for sprint 9.
Delvis implementert i https://gerrit.wikimedia.org/r/#/c/14762/ General * The config "apiUseKeys" will be set to true after review, it imply some changes in the UI. The parameters "usekeys" or "nousekeys" can be used to counter the effect of the config as necessary. Only one of them will be available. * The "gettoken" parameter was moved to the "\Wikibase\Api.php" base class, so all modules will have access to it, and especially a token can be acquired through wbgetitems. getitems * no further change getitemid module * Removed setlanguageattribute * Removed "item" parameter. Only wbsetitem can create an item. deletelanguageattribute * Removed getsitelinks * Removed linksite * Renamed to wbsetsitelink * Removed "item" parameter. Only wbsetitem can create an item. * Removed "link" parameter. All attempts to set a link will succeed. setaliases * Removed "item" parameter. Only wbsetitem can create an item. setitem * Removed "languages" parameter * Remove "item" parameter. Works as approx as "add" (!) unless an item is identified, then it sets individual props in the identified item. If necessary extension of identified items can be turned off. (Not added yet) * Updated description to clarify that for now the module can only be used for creating new empty items (data={}), and that other use is "undocumented behavior". * Added validation of json data (https://bugzilla.wikimedia.org/show_bug.cgi?id=36519, https://bugzilla.wikimedia.org/show_bug.cgi?id=38234) wblinktitles * New module, not implemented in this patchset..
Closed as such. Some follow-up bugs noted, though.
Verified in Wikidata demo time for sprint 11