Module:Sandbox/Kotz/G

function getProperty( entityName, propertyName ) local entity mw.log ("entityName=" .. entityName) mw.log ("propertyName=" .. propertyName) if (entityName) then entity=mw.wikibase.getEntityObject; else entity=mw.wikibase.getEntityObject(entityName) end if (entity) then mw.log(entity) if (entity.claims) then local property = entity.getProperties if (property) then return property end end end return end function property( frame ) local status, result = pcall(getProperty, string.upper(frame.args[1]), string.lower(frame.args[2])) return (status and '' or 'Error: ') .. (result or '') end return { property = property, Property = property }