MediaWiki API 帮助

这是自动生成的MediaWiki API文档页面。

文档和例子:https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

prop=templates (tl)

main | query | templates
  • 此模块需要读取权限。
  • 此模块可作为发生器使用。
  • 来源:MediaWiki
  • 许可协议:GPL-2.0-or-later

返回指定页面上所有被嵌入的页面。

参数:
tlnamespace

只显示此命名空间的模板。

值(以|替代物分隔):-1、-2、0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15、102、103、106、107、108、109、112、113、114、115、274、275、828、829、2300、2301、2302、2303、2600
要指定所有值,请使用*
tllimit

返回的模板数量。

类型:整数或max
值必须介于1和500之间。
默认:10
tlcontinue

当更多结果可用时,使用这个继续。

tltemplates

只列出这些模板。对于检查某一页面使用某一模板很有用。

通过|替代物隔开各值。
值的最大值为50(允许更高上限的客户端为500)。
tldir

罗列所采用的方向。

以下值中的一个:ascending、descending
默认:ascending
例子:
获取在页面Main Page使用的模板。
api.php?action=query&prop=templates&titles=Main%20Page [在沙盒中打开]
获取有关Main Page中使用的模板页面的信息。
api.php?action=query&generator=templates&titles=Main%20Page&prop=info [在沙盒中打开]
获取在用户和模板命名空间中,嵌入在Main Page页面的页面。
api.php?action=query&prop=templates&titles=Main%20Page&tlnamespace=2|10 [在沙盒中打开]