Module:New edits

From Free Man Creator

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

local p = {}

function p.week()
	
	local startdate = os.date('%F')
	local enddate = os.date('%F', os.time() - 7 * 60 * 60 * 24 )
	
	local data = mw.ext.externaldata.getWebData {
    	url = 'https://anthroposophy.eu/w/api.php?action=query&format=json&list=recentchanges' ..
    	'&rcstart=' .. startdate.. 'T23%3A59%3A59.000Z' ..
    	'&rcend=' .. enddate .. 'T00%3A00%3A00.000Z&rclimit=500' ..
    	'&rcexcludeuser=WikiVisor&rcnamespace=&rctype=edit'
		, format = 'JSON'
	}
	return #data
	
end

return p