Extension:UnlinkedWikibase

The UnlinkedWikiata extension provides access to Wikibase entities from wikis that are not linked to a Wikibase site. For example, a private wiki with a page about Goats could retrieve metadata from the Wikidata item and display it in an infobox.

Lua data-retrieval API
The extension integrates with to provide two Lua data-retrieval functions: one to retrieve a single entity and another one to retrieve the results of a SPARQL query.


 * mw.ext.UnlinkedWikibase.getEntity( id )
 * Returns the entire entity object (as is seen at d:Special:EntityData/Q2934.json for the goat example). This is similar to Wikibase's own, which works for pages that do have sitelinks to an entity.


 * mw.ext.UnlinkedWikibase.query( sparql )
 * Runs the given SPARQL query against the Wikidata Query Service and returns the result.

Linking pages to Wikibase entities
There is also a means to associate a wiki page with a Wikibase entity. This is done with the parser function, which stores the given ID as a page property for the page on which it's used. This ID can then be retrieved in the context of other pages via the method, which returns a Title object for the relevant page.


 * Parser function
 * Set a page's Wikibase entity ID.


 * Lua method
 * Get a Title object for a page that uses.

Configuration
If you don't want to link to Wikidata, or to configure the SPARQL query result cache timeout, in :