Template:ApiParam/doc
From HandWiki
![]() | This is a documentation subpage for Template:ApiParam It may contain usage information, categories and other content that is not part of the original template page. |
- Consider replacing invocations of this template with Special:ApiHelp transclusion (phab:T89318), since filling in this template redundantly repeats API parameter documentation in source code.
Usage
This template can be used to document API parameters. Its intent is to harmonize the appearance of template parameters across all of the API pages.
{{ApiParam |name= |description= |bullet= |required= |maxallowed= |maxallowedbot= |type= |values= |default= |version= |deprecated= |removed= }}
ApiParam parameters | |
---|---|
Parameter Name | Description |
name (or first unnamed) |
The parameter name (required). |
description (or second unnamed) |
A description of the parameter. |
bullet |
For values that have full descriptions of their own, as is often the case with prop parameters, can be used to add extra *'s to the bullet.
|
required |
Specify a value if the parameter is required. The name of the required parameter will be bolded. |
maxallowed |
For pipe-separated values or numeric quantities, the maximum allowed. |
maxallowedbot |
As above, for bots. If 50 or 500 is used for maxallowed , this will default to 500 or 5000, respectively.
|
type |
The data type of the parameter. |
values |
A list of possible values for the parameter. |
default |
The default value for the parameter. |
version |
The version the parameter was introduced in. Use the plain MediaWiki version number only. |
deprecated |
The version the parameter was deprecated in. Use the plain MediaWiki version number only. |
removed |
The version the parameter was removed in. Use the plain MediaWiki version number only. |
Examples
{{ApiParam|amfilter|Return only messages with names that contain this string}}
amfilter
: Return only messages with names that contain this string
{{ApiParam|siprop|Which properties to get|default=general}} {{ApiParam|bullet=*|general|General site information}} {{ApiParam|bullet=**|articlepath|[[$wgArticlePath]]|version=1.15}}
siprop
: Which properties to get (Default: general)general
: General site informationarticlepath
: $wgArticlePath 1.15+
See also
- {{Parameter}} – older version of ApiParam