Template:Api help

From Bonkipedia
Revision as of 14:38, 14 October 2021 by [[mw:]]>Keymap9 (PNG --> SVG)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)



Template documentation

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.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
API Method Name1

The name of the API method.

You can reference query submodules by using “module”+“submodule” (e.g.: “query+extracts”).

Auto value
{{subst:lc:{{subst:PAGENAME}}}}
Stringrequired

Sample

{{Api help|query+extracts}} produces



prop=extracts (ex)

(main | query | extracts)

Returns plain-text or limited HTML extracts of the given pages.

Parameters:
exchars

How many characters to return. Actual text returned might be slightly longer.

Type: integer
The value must be between 1 and 1,200.
exsentences

How many sentences to return.

Type: integer
The value must be between 1 and 10.
exlimit

How many extracts to return. (Multiple extracts can only be returned if exintro is set to true.)

Type: integer or max
The value must be between 1 and 20.
Default: 20
exintro

Return only content before the first section.

Type: boolean (details)
explaintext

Return extracts as plain text instead of limited HTML.

Type: boolean (details)
exsectionformat

How to format sections in plaintext mode:

plain
No formatting.
wiki
Wikitext-style formatting (== like this ==).
raw
This module's internal representation (section titles prefixed with <ASCII 1><ASCII 2><section level><ASCII 2><ASCII 1>).
One of the following values: plain, raw, wiki
Default: wiki
excontinue

When more results are available, use this to continue.

Type: integer


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