跳转到内容

模組:Taxobox wikidata/sandbox

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是本页的一个历史版本,由Taeas留言 | 贡献2023年7月14日 (五) 08:44编辑。这可能和当前版本存在着巨大的差异。

local wikidata = require("Module:WikidataIB")

local l = {}
local p = {}

function l.getData(args, id)
	local opts = {id}
	opts.qid = has_content(args.qid) and args.qid or nil
	opts.onlysourced = has_content(args.onlysourced) and args.onlysourced or "no"
	opts.noicon = has_content(args.noicon) and args.noicon or "yes"
	opts.fetchwikidata = has_content(args.fetchwikidata) and args.fetchwikidata or "ALL"
    opts.suppressfields = has_content(args.suppressfields) and args.suppressfields or nil
	return wikidata._getValue(opts)
end

function p.main(frame)
    return l.getData({qid = 'Q42196', id = 'P225'})
end