Last modified: 2012-12-13 11:18:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40182, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38182 - Review WikidataRepo API
Review WikidataRepo API
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Highest normal (vote)
: ---
Assigned To: Wikidata bugs
storypoints: 8
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-04 23:20 UTC by denny vrandecic
Modified: 2012-12-13 11:18 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description denny vrandecic 2012-07-04 23:20:27 UTC
Review the API in time for getting closer to deployment.
Comment 1 denny vrandecic 2012-07-05 11:25:19 UTC
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)
Comment 2 denny vrandecic 2012-07-05 14:07:23 UTC
Picked for sprint 9.
Comment 3 jeblad 2012-07-09 13:20:14 UTC
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..
Comment 4 denny vrandecic 2012-08-08 19:05:31 UTC
Closed as such. Some follow-up bugs noted, though.
Comment 5 Anja Jentzsch 2012-11-29 12:39:00 UTC
Verified in Wikidata demo time for sprint 11

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links