Module:AWBVersions: Difference between revisions
Appearance
Content deleted Content added
other outputting |
Try outputting something useful |
||
Line 3: | Line 3: | ||
function p.main( frame ) |
function p.main( frame ) |
||
local version = mw.title.makeTitle( 'Wikipedia', 'AutoWikiBrowser/CheckPage/VersionJSON' ) |
local version = mw.title.makeTitle( 'Wikipedia', 'AutoWikiBrowser/CheckPage/VersionJSON' ) |
||
return version:getContent() |
|||
local decoded = mw.text.jsonDecode( version:getContent() ) |
|||
local output = "Current Version: " .. decoded.currentversion .. "\n" |
|||
output = output .. "Newest Version: " .. decoded.newestversion .. "\n" |
|||
return output |
|||
end |
end |
||
Revision as of 08:19, 1 July 2016
Lua error at line 7: attempt to concatenate field 'currentversion' (a nil value).
Pulls data from Wikipedia:AutoWikiBrowser/CheckPage/VersionJSON
local p = {}
function p.main( frame )
local version = mw.title.makeTitle( 'Wikipedia', 'AutoWikiBrowser/CheckPage/VersionJSON' )
local decoded = mw.text.jsonDecode( version:getContent() )
local output = "Current Version: " .. decoded.currentversion .. "\n"
output = output .. "Newest Version: " .. decoded.newestversion .. "\n"
return output
end
return p