MediaWiki API 帮助

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

文档和例子:-{R|https://www.mediawiki.org/wiki/API:Main_page/zh}-

prop=templates (tl)

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

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

参数:
tlnamespace

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

值(以|替代物分隔):0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
tllimit

返回的模板数量。

不允许超过500个(对于机器人则是5,000个)。
类型:整数或max
默认:10
tlcontinue

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

tltemplates

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

通过|替代物隔开各值。 值的最高数字是50(对于机器人则是500)。
tldir

罗列所采用的方向。

以下值中的一个:ascendingdescending
默认: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 [在沙盒中打开]
获取在User和Template名字空间中,嵌入在Main Page页面的页面。
api.php?action=query&prop=templates&titles=Main%20Page&tlnamespace=2|10 [在沙盒中打开]