More actions
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
function p.test(frame) | function p.test(frame) | ||
if (frame.args[1] == nil) then return end | |||
local out = {} | local out = {} | ||
local payload = { | |||
url=url .. '/api.php?action=query&format=json&list=categorymembers&cmlimit=max&cmtitle=Category:' .. util.firstToUpper(frame.args[1]), | |||
format='json' | format='json' | ||
} | } |
Revision as of 13:47, 3 September 2025
Documentation for this module may be created at Module:Test/doc
local p = {}
local util = require('Module:Utility')
local url = mw.site.server .. mw.site.scriptPath
function p.test(frame)
if (frame.args[1] == nil) then return end
local out = {}
local payload = {
url=url .. '/api.php?action=query&format=json&list=categorymembers&cmlimit=max&cmtitle=Category:' .. util.firstToUpper(frame.args[1]),
format='json'
}
local json = mw.ext.externalData.getExternalData(payload)
return payload.url
end
return p