Modul:Stadtwikis: Unterschied zwischen den Versionen

Aus FürthWiki

Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 4: Zeile 4:
function p.Versuch(frame)
function p.Versuch(frame)
t = getAPIdata("https://www.fuerthwiki.de/wiki/api.php?action=query&meta=siteinfo&siprop=statistics&format=json")
t = getAPIdata("https://www.fuerthwiki.de/wiki/api.php?action=query&meta=siteinfo&siprop=statistics&format=json")
return t['articles']
return tabelizeData(t)
end
 
function tabelizeData(t)
h='<td>'..t['articles']..'</td>'
return h
end
end



Version vom 12. Mai 2025, 12:55 Uhr

Die Dokumentation für dieses Modul kann unter Modul:Stadtwikis/Doku erstellt werden

local p = {}
local c = require( "Module:Common" )

function p.Versuch(frame)
	t = getAPIdata("https://www.fuerthwiki.de/wiki/api.php?action=query&meta=siteinfo&siprop=statistics&format=json")
	return tabelizeData(t)
end

function tabelizeData(t)
	h='<td>'..t['articles']..'</td>'
	return h
end

function getAPIdata(url)
	t = mw.ext.externalData.getWebData {url=url}
    return t
end
return p