Changes
Jump to navigation
Jump to search
keep examples in english for coherence of the topic
<noinclude>
<languages />
</noinclude><includeonly>{{#switch:<translate></translate><!--
-->| =<!--
--><code {{#if:{{{required|}}}|style="font-weight:bold"}} {{#if:{{{id|{{{1|{{{name|}}}}}}}}}|id="{{{id|{{{1|{{{name}}}}}}}}}"}}>{{{1|{{{name|}}}}}}</code>{{#if:{{{2|{{{description|}}}}}}|: {{{2|{{{description|}}}}}}}}{{#if:{{{maxallowed|}}}| <translate><!--T:2--> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:{{{maxallowedbot|}}}|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:{{{type|}}}| '''<translate><!--T:3--> Type:</translate>''' {{{type}}}}}{{#if:{{{values|}}}| <translate><!--T:1--> Possible values:</translate> {{{values}}}}}{{#if:{{{default|}}}| (<translate><!--T:4--> Default:</translate> {{{default}}})}}{{#if:{{{version|}}}| {{MW version-inline|{{#switch:{{#if:{{{removed|}}}|R}}
|={{{version}}}+
|R={{{version}}}-{{{removed}}}
}}}}}}{{#if:{{{deprecated|}}}| {{deprecated-inline|1={{{deprecated}}}}}}}{{#if:{{{removed|}}}| {{removed-inline|{{{removed}}}}}}}<!--
-->| #default=<!--
-->{{#invoke:Template translation|renderTranslatedTemplate|template=Template:ApiParam|noshift=1}}<!--
-->}}</includeonly><noinclude>
{{Documentation|content=
:<translate><!--T:16--> ''Consider replacing invocations of this template with Special:ApiHelp transclusion (<tvar|task>[[phab:T89318]]</>), since filling in this template redundantly repeats API parameter documentation in source code.''</translate>
<translate>
== Usage == <!--T:7-->
<!--T:8-->
This template can be used to document API parameters.</translate>
<translate>
<!--T:9-->
Its intent is to harmonize the appearance of template parameters across all of the API pages.
</translate>
{{Pre2|style=display:inline-block
|1=<nowiki>{{ApiParam
|</nowiki>''name=''<nowiki>
|</nowiki>''description=''<nowiki>
|required=
|maxallowed=
|maxallowedbot=
|type=
|values=
|default=
|version=
|deprecated=
|removed=
}}</nowiki>}}
<table class="wikitable sortable">
<tr><th colspan=2><translate><!--T:17--> ApiParam parameters</translate></th></tr>
<tr><th><translate><!--T:18--> Parameter Name</translate></th><th><translate><!--T:19--> Description</translate></th></tr>
<tr><td><code>'''name'''</code> ''<translate><!--T:20--> (or first unnamed)</translate>''</td><td><translate><!--T:21--> The parameter name (required).</translate></td></tr>
<tr><td><code>description</code> ''<translate><!--T:22--> (or second unnamed</translate>)''</td><td><translate><!--T:23--> A description of the parameter.</translate></td></tr>
<tr><td><code>required</code></td><td><translate><!--T:24--> Specify a value if the parameter is required.</translate> <translate><!--T:25--> The name of the required parameter will be bolded.</translate></td></tr>
<tr><td><code>maxallowed</code></td><td><translate><!--T:26--> For pipe-separated values or numeric quantities, the maximum allowed.</translate></td></tr>
<tr><td><code>maxallowedbot</code></td><td><translate><!--T:27--> As above, for bots.</translate> <translate><!--T:28--> If 50 or 500 is used for <code>maxallowed</code>, this will default to 500 or 5000, respectively.</translate></td></tr>
<tr><td><code>type</code></td><td><translate><!--T:29--> The data type of the parameter.</translate></td></tr>
<tr><td><code>values</code></td><td><translate><!--T:30--> A list of possible values for the parameter.</translate></td></tr>
<tr><td><code>default</code></td><td><translate><!--T:31--> The default value for the parameter.</translate></td></tr>
<tr><td><code>version</code></td><td><translate><!--T:32--> The version the parameter was introduced in.</translate> <translate><!--T:33--> Use the plain MediaWiki version number only.</translate></td></tr>
<tr><td><code>deprecated</code></td><td><translate><!--T:34--> The version the parameter was deprecated in.</translate> <translate><!--T:35--> Use the plain MediaWiki version number only.</translate></td></tr>
<tr><td><code>removed</code></td><td><translate><!--T:36--> The version the parameter was removed in.</translate> <translate><!--T:37--> Use the plain MediaWiki version number only.</translate></td></tr>
</table>
<translate>
== Examples == <!--T:10-->
</translate>
<pre style="display:inline-block">*{{ApiParam|rcid|One or more recent changes IDs from which to add or remove the tag.|maxallowed=50}}</pre>
*{{ApiParam|rcid|One or more recent changes IDs from which to add or remove the tag.|maxallowed=50}}
<pre style="display:inline-block">*{{ApiParam|siprop|Which properties to get|default=general}}
**{{ApiParam|general|General site information}}
***{{ApiParam|articlepath|{{ll|Manual:$wgArticlePath|$wgArticlePath}}|version=1.15}}</pre>
*{{ApiParam|siprop|Which properties to get|default=general}}
**{{ApiParam|general|General site information}}
***{{ApiParam|articlepath|{{ll|Manual:$wgArticlePath|$wgArticlePath}}|version=1.15}}
<translate>
== See also == <!--T:11-->
</translate>
* {{tl|Parameter}} – <translate><!--T:12--> older version of <tvar|1>ApiParam</></translate>
}}
[[Category:Typing-aid templates{{#translation:}}]]
[[Category:Formatting templates{{#translation:}}]]
</noinclude>
<languages />
</noinclude><includeonly>{{#switch:<translate></translate><!--
-->| =<!--
--><code {{#if:{{{required|}}}|style="font-weight:bold"}} {{#if:{{{id|{{{1|{{{name|}}}}}}}}}|id="{{{id|{{{1|{{{name}}}}}}}}}"}}>{{{1|{{{name|}}}}}}</code>{{#if:{{{2|{{{description|}}}}}}|: {{{2|{{{description|}}}}}}}}{{#if:{{{maxallowed|}}}| <translate><!--T:2--> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:{{{maxallowedbot|}}}|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:{{{type|}}}| '''<translate><!--T:3--> Type:</translate>''' {{{type}}}}}{{#if:{{{values|}}}| <translate><!--T:1--> Possible values:</translate> {{{values}}}}}{{#if:{{{default|}}}| (<translate><!--T:4--> Default:</translate> {{{default}}})}}{{#if:{{{version|}}}| {{MW version-inline|{{#switch:{{#if:{{{removed|}}}|R}}
|={{{version}}}+
|R={{{version}}}-{{{removed}}}
}}}}}}{{#if:{{{deprecated|}}}| {{deprecated-inline|1={{{deprecated}}}}}}}{{#if:{{{removed|}}}| {{removed-inline|{{{removed}}}}}}}<!--
-->| #default=<!--
-->{{#invoke:Template translation|renderTranslatedTemplate|template=Template:ApiParam|noshift=1}}<!--
-->}}</includeonly><noinclude>
{{Documentation|content=
:<translate><!--T:16--> ''Consider replacing invocations of this template with Special:ApiHelp transclusion (<tvar|task>[[phab:T89318]]</>), since filling in this template redundantly repeats API parameter documentation in source code.''</translate>
<translate>
== Usage == <!--T:7-->
<!--T:8-->
This template can be used to document API parameters.</translate>
<translate>
<!--T:9-->
Its intent is to harmonize the appearance of template parameters across all of the API pages.
</translate>
{{Pre2|style=display:inline-block
|1=<nowiki>{{ApiParam
|</nowiki>''name=''<nowiki>
|</nowiki>''description=''<nowiki>
|required=
|maxallowed=
|maxallowedbot=
|type=
|values=
|default=
|version=
|deprecated=
|removed=
}}</nowiki>}}
<table class="wikitable sortable">
<tr><th colspan=2><translate><!--T:17--> ApiParam parameters</translate></th></tr>
<tr><th><translate><!--T:18--> Parameter Name</translate></th><th><translate><!--T:19--> Description</translate></th></tr>
<tr><td><code>'''name'''</code> ''<translate><!--T:20--> (or first unnamed)</translate>''</td><td><translate><!--T:21--> The parameter name (required).</translate></td></tr>
<tr><td><code>description</code> ''<translate><!--T:22--> (or second unnamed</translate>)''</td><td><translate><!--T:23--> A description of the parameter.</translate></td></tr>
<tr><td><code>required</code></td><td><translate><!--T:24--> Specify a value if the parameter is required.</translate> <translate><!--T:25--> The name of the required parameter will be bolded.</translate></td></tr>
<tr><td><code>maxallowed</code></td><td><translate><!--T:26--> For pipe-separated values or numeric quantities, the maximum allowed.</translate></td></tr>
<tr><td><code>maxallowedbot</code></td><td><translate><!--T:27--> As above, for bots.</translate> <translate><!--T:28--> If 50 or 500 is used for <code>maxallowed</code>, this will default to 500 or 5000, respectively.</translate></td></tr>
<tr><td><code>type</code></td><td><translate><!--T:29--> The data type of the parameter.</translate></td></tr>
<tr><td><code>values</code></td><td><translate><!--T:30--> A list of possible values for the parameter.</translate></td></tr>
<tr><td><code>default</code></td><td><translate><!--T:31--> The default value for the parameter.</translate></td></tr>
<tr><td><code>version</code></td><td><translate><!--T:32--> The version the parameter was introduced in.</translate> <translate><!--T:33--> Use the plain MediaWiki version number only.</translate></td></tr>
<tr><td><code>deprecated</code></td><td><translate><!--T:34--> The version the parameter was deprecated in.</translate> <translate><!--T:35--> Use the plain MediaWiki version number only.</translate></td></tr>
<tr><td><code>removed</code></td><td><translate><!--T:36--> The version the parameter was removed in.</translate> <translate><!--T:37--> Use the plain MediaWiki version number only.</translate></td></tr>
</table>
<translate>
== Examples == <!--T:10-->
</translate>
<pre style="display:inline-block">*{{ApiParam|rcid|One or more recent changes IDs from which to add or remove the tag.|maxallowed=50}}</pre>
*{{ApiParam|rcid|One or more recent changes IDs from which to add or remove the tag.|maxallowed=50}}
<pre style="display:inline-block">*{{ApiParam|siprop|Which properties to get|default=general}}
**{{ApiParam|general|General site information}}
***{{ApiParam|articlepath|{{ll|Manual:$wgArticlePath|$wgArticlePath}}|version=1.15}}</pre>
*{{ApiParam|siprop|Which properties to get|default=general}}
**{{ApiParam|general|General site information}}
***{{ApiParam|articlepath|{{ll|Manual:$wgArticlePath|$wgArticlePath}}|version=1.15}}
<translate>
== See also == <!--T:11-->
</translate>
* {{tl|Parameter}} – <translate><!--T:12--> older version of <tvar|1>ApiParam</></translate>
}}
[[Category:Typing-aid templates{{#translation:}}]]
[[Category:Formatting templates{{#translation:}}]]
</noinclude>