MediaWiki API 帮助
这是自动生成的MediaWiki API文档页面。
文档和例子:https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=jsontransform
(main | jsontransform)
- 此模块是内部或不稳定的,不应该使用。它的操作可以更改而不另行通知。
- 此模块需要读取权限。
- 来源:JsonConfig
- 许可协议:GPL-2.0-or-later
Retrieve JSON data transformed by a Lua function.
具体参数:
其他通用参数可用。
- title
Title to process without namespace prefix.
- 这个参数是必需的。
- jtmodule
Name of Lua module to load transform code from. Defaults to Module: namespace.
- 这个参数是必需的。
- jtfunction
Name of Lua function to run
- 这个参数是必需的。
- jtargs
Sequence of strings to pass as arguments to the Lua transform function
- 各变量值应以|或其转义序列分隔。
- 值的最大值为50(允许更高上限的客户端为500)。
例子:
- Get JSON content of the Sample.tab page running through a Lua transform
- api.php?action=jsontransform&formatversion=2&format=jsonfm&title=Sample.tab&jtmodule=Samples&jtfunction=round&jtargs=decimals=2|columns=a,b [在沙盒中打开]