From WikiChip
Difference between revisions of "Module:wikichip"

(Created page with "local wikichip = {} local chip = { valid = false } function chip.new(name) chip.result = mw.smw.getQueryResult( 'name::Core i3-7100[[instance of::microprocesso...")
 
Line 5: Line 5:
 
}
 
}
  
function chip.new(name)
+
function wikichip.new(name)
 
chip.result = mw.smw.getQueryResult(
 
chip.result = mw.smw.getQueryResult(
 
     '[[name::Core i3-7100]][[instance of::microprocessor]]' ..
 
     '[[name::Core i3-7100]][[instance of::microprocessor]]' ..

Revision as of 19:09, 17 May 2017

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

local wikichip = {}
local chip = {
  
  valid = false
}

function wikichip.new(name)
	chip.result = mw.smw.getQueryResult(
    	'[[name::Core i3-7100]][[instance of::microprocessor]]' ..
    	'|?name' ..
    	'|?designer' ..
    	'|limit=1|mainlabel=page'
    )
    
    return chip
end

return wikichip