Diferencia entre revisiones de «Módulo:Wikidata»

mSin resumen de edición
m Deshecha la edición 124348130 de Amitie 10g (disc.)
Línea 932: Línea 932:


-- Funciones existentes en otros módulos
-- Funciones existentes en otros módulos
function obtenerEtiquetaWikidata(entidad)
function p.obtenerEtiquetaWikidata(entidad)
if not entidad then entidad = Entidad end
if not entidad then entidad = Entidad end
if entidad and entidad.labels and entidad.labels.es then
if entidad and entidad.labels and entidad.labels.es then
Línea 939: Línea 939:
end
end


function obtenerImagenWikidata(propiedad)
function p.obtenerImagenWikidata(propiedad)
local imagen, valorImagen, piesDeImagen, k, pieDeImagen
local imagen, valorImagen, piesDeImagen, k, pieDeImagen
if not Entidad then
if not Entidad then
Línea 968: Línea 968:
end
end


function propiedad(idPropiedad,opciones)
function p.propiedad(idPropiedad,opciones)
if Entidad and Entidad.claims and Entidad.claims[idPropiedad] then
if Entidad and Entidad.claims and Entidad.claims[idPropiedad] then
if not opciones then
if not opciones then
Línea 980: Línea 980:
end
end


function esUnValor(entidad, idPropiedad, idaBuscar)
function p.esUnValor(entidad, idPropiedad, idaBuscar)
if not entidad or not idPropiedad then
if not entidad or not idPropiedad then
return false
return false