Module:MerlinAPI

From Coder Merlin
Jump to navigation Jump to search

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

-- returns: url to be used for this user's igis url
local p = {} --p stands for package

function p.igisURL( frame )
	mainUri = mw.uri.canonicalUrl("Main", "")
	userName = string.lower(frame:callParserFunction{ name = '#username', args = { "anonymous" } })
	return mainUri.protocol .. "://" .. mainUri.host .. "/igis/" .. userName .. "/"
end

function p.guacamoleURL( frame )
	mainUri = mw.uri.canonicalUrl("Main", "")
	userName = string.lower(frame:callParserFunction{ name = '#username', args = { "anonymous" } })
	return mainUri.protocol .. "://" .. mainUri.host .. "/guacamole/"
end

return p