Documentation for this module may be created at Module:API info/metrics/doc
-- https://github.com/Ketho/WowpediaDoc/blob/master/Projects/TownlongWut/Metrics.lua
local m = {}
local api_types = {
a = "globalapi",
e = "events",
-- "framexml",
-- "templates",
}
local wut_comment = '%d results; Archived data from Townlong Yak Globe wut on 2022-06-01'
local hover_tt = '<span title="%s">%s</span>'
function m:GetScoreString(tbl, show_desc)
local score = string.format('<font color="#4ec9b0">#%d</font>', tbl[1])
local comment = wut_comment:format(tbl[2])
if show_desc then
score = "Popularity "..score
end
return hover_tt:format(comment, score)
end
function m:main(apiType, name)
local data = mw.loadData("Module:API_info/metrics/"..api_types[apiType])
return data[name]
end
return m