Module:TestSMW: Difference between revisions

From TITAF TANGOWIKI
(Created page with "local p = {} function p.test(frame) local result = mw.smw.ask("Category:Songs|?Title|?Author|limit=5") return mw.text.jsonEncode(result) -- Outputs JSON of the result end return p")
 
No edit summary
 
Line 2: Line 2:


function p.test(frame)
function p.test(frame)
     local result = mw.smw.ask("[[Category:Songs]]|?Title|?Author|limit=5")
     return "Scribunto Lua 5.1 is working!"
    return mw.text.jsonEncode(result) -- Outputs JSON of the result
end
end


return p
return p

Latest revision as of 21:02, 20 March 2025

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

local p = {}

function p.test(frame)
    return "Scribunto Lua 5.1 is working!"
end

return p