Category Reporter: Difference between revisions

From Freephile Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
This page is a demo of using a Lua Module to process data from the mw.Api
This page is a demo of using [[Module:CategoryReporter|a Lua Module]] to process data from the mw.Api


While we can invoke the api [[Categories/javascript|via JavaScript]], we wanted to try out a little bit of Lua, which in the end would also allow for integration with the ExternalData extension to be able to process and format data from other wikis outside this farm.
While we can invoke the api [[Categories/javascript|via JavaScript]], we wanted to try out a little bit of Lua, which in the end would also allow for integration with the ExternalData extension to be able to process and format data from other wikis outside this farm.
Line 5: Line 5:
Example local Api query that could be easily manipulated in JavaScript.
Example local Api query that could be easily manipulated in JavaScript.
https://wiki.freephile.org/wiki/api.php?action=query&list=categorymembers&cmtitle=Category:Documentation&cmtype=page&cmlimit=5000&format=json
https://wiki.freephile.org/wiki/api.php?action=query&list=categorymembers&cmtitle=Category:Documentation&cmtype=page&cmlimit=5000&format=json
[[Category:Lua]]
[[Category:API]]

Latest revision as of 13:39, 6 June 2025

This page is a demo of using a Lua Module to process data from the mw.Api

While we can invoke the api via JavaScript, we wanted to try out a little bit of Lua, which in the end would also allow for integration with the ExternalData extension to be able to process and format data from other wikis outside this farm.

Example local Api query that could be easily manipulated in JavaScript. https://wiki.freephile.org/wiki/api.php?action=query&list=categorymembers&cmtitle=Category:Documentation&cmtype=page&cmlimit=5000&format=json