Module:Sandbox/RexxS/Wd: Difference between revisions

Content deleted Content added
create skeleton
 
Licensed: CC-0
 
(2 intermediate revisions by the same user not shown)
Line 1:
--[[
Demo of calling Module:Wd from another module
Licensed: CC-0
--]]
 
Line 9 ⟶ 10:
function p.rundemo(frame)
local out = {}
local val
 
local-- val1this =is wd._property(equivalent to {"{wikidata|property|Q17533992", "|P31" } )}
val = wd._property( {"Q17533992", "P31"} )
out[#out+1] = val1val
 
-- this is equivalent to {{wikidata|property|Q17533992|P1435}}
val = wd._property( {"Q17533992", "P1435"} )
out[#out+1] = val
 
-- this is equivalent to {{wikidata|qualifier|Q17533992|P1435|P580}}
val = wd._qualifier( {"Q17533992", "P1435", "P580"} )
out[#out+1] = val
 
-- this is equivalent to {{wikidata|property|qualifier|Q17533992|P1435|P580}}
return ">" .. table.concat(out, "<br>") .."<"
val = wd._property( {"qualifier", "Q17533992", "P1435", "P580"} )
out[#out+1] = val
 
-- this is equivalent to {{wikidata|property|reference|Q17533992|P1435}}
val = wd._property( {"reference", "Q17533992", "P1435"} )
out[#out+1] = val
 
return "<h3> Demo </h3>" .. table.concat(out, "<br>") .."<"
end