Modulo:Wikidata: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
aggiornato al nuovo comportamento della getEntityObject, non-legacy style, e modifica uppercase in getArgs |
aggiunto rank "best" |
||
Riga 194:
ret = true
break
end
end
return ret
end
-- Ritorna i claim con il rank richiesto
local function filterRankValue( claims, rank )
local ret = {}
for i, claim in pairs( claims ) do
if claim.rank == rank then
table.insert( ret, claim )
end
end
Riga 203 ⟶ 214:
-- "rank", "qualifier", "qualifiertype" e "n"
local function getClaims( options )
-- get entity
Riga 213 ⟶ 224:
-- get property
if not options.property then
end
Riga 225 ⟶ 236:
-- statements filtrati per rank
if options.rank then
if
end
else
filteredClaims = filterRankValue( claims, options.rank )
end
claims = filteredClaims
|