Wikidata/Notes/API

This is an archived version of this page, as edited by Jeroen De Dauw (talk | contribs) at 10:08, 18 April 2012 (TODO). It may differ significantly from the current version.

The Wikidata API will simply be an extension of the existing MediaWiki API.

The following functions are being envisioned for Phase 1 (or even Phase 0.5, which is, for Wikimania.)

* means optional

Done

  • getItemId( site, title )
  • setLabel( ( id XOR ( site, title ) ), language, label) (ApiWikibaseSetLabel)
  • setDescription( ( id XOR ( site, title ) ), language, description) (ApiWikibaseSetDescription)
  • linkSite( ( id XOR ( site, title ) ), linksite, linktitle *badge) (ApiWikibaseSiteLink)

TODO

  • getSiteLinks( ( id XOR ( site, title ) )
  • getItem( ( id XOR ( site, title ) ), *language) - returns the data for a given ID or site+title pair. This is used by the Wikidata client extension. The language is set in order to add labels to the IDs. (ApiWikibaseGetItem )
  • addAlias(id, language, alias) (ApiWikibaseAddAlias)
  • removeAlias(id, language, alias) (ApiWikibaseRemoveAlias)
  • searchByName(language, fragment, *hints) (used for the Wikidata Suggest widget)

TODO