Extension:WikibaseMediaInfo/Lua

WikibaseMediaInfo provides a Lua Scribunto interface to access MediaInfo entities. It does so by:


 * 1) integrating with the existing [Extension:Wikibase_Client/Lua#mw.wikibase mw.wikibase methods], making MediaInfo entities accessible alongside other Wikibase entities.
 * 2) exposing a new set of methods under mw.wikibase.mediainfo, that is mostly identical to the mw.wikibase methods, but has been adapted to be more MediaInfo specific:
 * 3)   functions - an alias for   functions - have been added
 * 4)   doesn't support the   argument

mw.wikibase.mediainfo
has general Lua functionality for working with MediaInfo data.

mw.wikibase.mediainfo.getEntity
This function is identical to the more generic  provided by Wikibase, but will return MediaInfo entity objects. Please refer to Wikibase Lua documentation for mw.wikibase.getEntity.

mw.wikibase.mediainfo.getEntityIdForCurrentPage
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getEntityIdForCurrentPage.

mw.wikibase.mediainfo.getEntityIdForTitle
This function is identical to the more generic  provided by Wikibase, except that there is no support for a second argument: globalSiteId - entities are only accessible on the local wiki that acts as the MediaInfo repository. Please refer to Wikibase Lua documentation for mw.wikibase.getEntityIdForTitle.

mw.wikibase.mediainfo.getEntityUrl
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getEntityUrl.

mw.wikibase.mediainfo.getLabel
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getLabel.

mw.wikibase.mediainfo.getLabelWithLang
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getLabelWithLang.

mw.wikibase.mediainfo.getLabelByLang
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getLabelByLang.

mw.wikibase.mediainfo.getCaption
This function is an alias for getLabel.

mw.wikibase.mediainfo.getCaptionWithLang
This function is an alias for getLabelWithLang.

mw.wikibase.mediainfo.getCaptionByLang
This function is an alias for getLabelByLang.

mw.wikibase.mediainfo.getDescription
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getDescription.

mw.wikibase.mediainfo.getDescriptionWithLang
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getDescriptionWithLang.

mw.wikibase.mediainfo.isValidEntityId
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.isValidEntityId.

mw.wikibase.mediainfo.entityExists
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entityExists.

mw.wikibase.mediainfo.renderSnak
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.renderSnak.

mw.wikibase.mediainfo.formatValue
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.formatValue.

mw.wikibase.mediainfo.renderSnaks
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.renderSnaks.

mw.wikibase.mediainfo.formatValues
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.formatValues.

mw.wikibase.mediainfo.resolvePropertyId
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.resolvePropertyId.

mw.wikibase.mediainfo.getPropertyOrder
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getPropertyOrder.

mw.wikibase.mediainfo.orderProperties
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.orderProperties.

mw.wikibase.mediainfo.getBestStatements
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getBestStatements.

mw.wikibase.mediainfo.getAllStatements
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getAllStatements.

mw.wikibase.mediainfo.getReferencedEntityId
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getReferencedEntityId.

mw.wikibase.mediainfo.getGlobalSiteId
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.getGlobalSiteId.

MediaInfo entity object
(and, when invoked for a MediaInfo entity) will return a MediaInfo object representing the requested entity.

Like  and , these MediaInfo entity objects are essentially pretty much the same as   objects, except for:


 * 1) the addition of   methods as an alias for   methods
 * 2) the removal of the   method, which is a concept that doesn't apply to MediaInfo entities

entity:getId
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:getId.

entity:getLabel
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:getLabel.

entity:getCaption
This method is an alias for getLabel.

entity:getDescription
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:getDescription.

entity:getLabelWithLang
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:getLabelWithLang.

entity:getCaptionWithLang
This method is an alias for getCaptionWithLang.

entity:getDescriptionWithLang
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:getDescriptionWithLang.

entity:getProperties
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:getProperties.

entity:getBestStatements
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:getBestStatements.

entity:getAllStatements
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:getAllStatements.

entity:formatPropertyValues
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:formatPropertyValues.

entity:formatStatements
This function is identical to the more generic  provided by Wikibase. Please refer to Wikibase Lua documentation for mw.wikibase.entity:formatStatements.