Module:TestModule: Difference between revisions
Appearance
AdamZachar (talk | contribs) No edit summary |
AdamZachar (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
, format = 'CSV with header' | , format = 'CSV with header' | ||
} | } | ||
return data[1] | return data[1].Name | ||
end | end | ||
return p | return p |
Revision as of 10:18, 10 June 2025
local p = {} --p stands for package
function p.hello( frame )
return "Hello, world!"
end
function p.externalDataTest( frame )
local data, errors = mw.ext.externaldata.getWebData {
url = 'https://discoursedb.org/wiki/Special:GetData/Fruits_data'
, data = {name = 'Name', color = 'Color', shape = 'Shape'}
, format = 'CSV with header'
}
return data[1].Name
end
return p