Module:WikidataClient

From PKC
Revision as of 15:16, 8 January 2022 by Benkoo (talk | contribs) (Created page with "p = {} function p.wikidata(cf) item = mw.wikibase.getEntity('Q44062313') p664 = item.claims.P664 organizersTable = {} for _, valuesTable in ipairs (p664) do orgId = val...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:WikidataClient/doc

p = {}

function p.wikidata(cf)
	item = mw.wikibase.getEntity('Q44062313')
	p664 = item.claims.P664
	organizersTable = {}
	for _, valuesTable in ipairs (p664) do
		orgId = valuesTable.mainsnak.datavalues.value.id
		orgItem = mw.wikibase.getEntity(orgId)
		table.insert(organizersTable, orgItem.lables.en.value)
	end
	organizersTable = table.concat(organizerTable, '<br/>')
	return cf:preproces(organizersTable)
end

return p