跳转到内容

模板:Api help

来自天灾之下:危险连接资料站
wiki>Pppery2025年9月11日 (四) 05:10的版本 (Not an improvement)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)


模板文档

This transcludes Special:ApiHelp/module-name and explains what's going on.

Usage

[<span style="" title="<translate nowrap> View this template</translate>"><translate> view</translate> · <span style="" title="<translate nowrap> Discuss this template</translate>"><translate> talk</translate> · <span style="" title="<translate nowrap> Edit this template</translate>"><translate> edit</translate>]

This is the TemplateData documentation for this template used by VisualEditor and other tools.

Api help

This transcludes the API help page from “Special:ApiHelp” with a message box.

模板参数[编辑模板数据]

此模板首选参数不换行的行内格式。

参数描述类型状态
API method name1

The name of the API method. You can reference query submodules by using “module”+“submodule” (e.g.: “query+extracts”).

自动值
{{subst:lc:{{subst:PAGENAME}}}}
字符串必需
Frameframe

If set, add a light frame around the generated documentation.

自动值
yes
布尔可选

Sample

{{Api help|query+extracts}} produces


prop=extracts (ex)

(main | query | extracts)
  • 此模块需要读取权限。
  • 来源:TextExtracts
  • 许可协议:GPL-2.0-or-later

返回指定页面的纯文本或有限HTML格式摘录。

具体参数:
其他通用参数可用。
exchars

返回字符数。实际返回的文本可能比这稍长。

类型:整数
值必须介于1和1,200之间。
exsentences

返回句子数。

类型:整数
值必须介于1和10之间。
exlimit

返回摘录数。(当exintro设为true时才能返回多段摘录。)

类型:整数或max
值必须介于1和20之间。
默认:20
exintro

只返回首个章节前的内容。

类型:布尔型 (详情)
explaintext

以纯文本而非有限HTML返回摘录。

类型:布尔型 (详情)
exsectionformat

纯文本模式下格式化章节方式:

plain
无格式。
wiki
wikitext样式的格式(== 像这样 ==)。
raw
此模块的内部表示方法(章节标题前缀<ASCII 1><ASCII 2><章节级别><ASCII 2><ASCII 1>)
以下值中的一个:plain、​raw、​wiki
默认:wiki
excontinue

当更多结果可用时,使用这个继续。可在 mediawiki.org 获取更多有关如何继续查询的详细信息。

类型:整数

You can't transclude the help of multiple API modules at once