Changes
Jump to navigation
Jump to search
Template:ApiParam/es (view source)
Revision as of 19:26, 26 September 2019
, 19:26, 26 September 2019Updating to match new version of source page
<noinclude>
<languages />
</noinclude><includeonly>{{#switch:<!--
-->| =<!--
--><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|}}}| No more than {{{maxallowed}}} ({{#if:{{{maxallowedbot|}}}|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}} for bots) allowed.}}{{#if:{{{type|}}}| '''Type:''' {{{type}}}}}{{#if:{{{values|}}}| Possible values: {{{values}}}}}{{#if:{{{default|}}}| (Default: {{{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=
:''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.''
== Uso ==
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.
{{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>ApiParam parameters</th></tr>
<tr><th>Parameter Name</th><th>Description</th></tr>
<tr><td><code>'''name'''</code> ''(or first unnamed)''</td><td>The parameter name (required).</td></tr>
<tr><td><code>description</code> ''(or second unnamed)''</td><td>A description of the parameter.</td></tr>
<tr><td><code>required</code></td><td>Specify a value if the parameter is required. The name of the required parameter will be bolded.</td></tr>
<tr><td><code>maxallowed</code></td><td>For pipe-separated values or numeric quantities, the maximum allowed.</td></tr>
<tr><td><code>maxallowedbot</code></td><td>As above, for bots. If 50 or 500 is used for <code>maxallowed</code>, this will default to 500 or 5000, respectively.</td></tr>
<tr><td><code>type</code></td><td>The data type of the parameter.</td></tr>
<tr><td><code>values</code></td><td>A list of possible values for the parameter.</td></tr>
<tr><td><code>default</code></td><td>The default value for the parameter.</td></tr>
<tr><td><code>version</code></td><td>The version the parameter was introduced in. Use the plain MediaWiki version number only.</td></tr>
<tr><td><code>deprecated</code></td><td>The version the parameter was deprecated in. Use the plain MediaWiki version number only.</td></tr>
<tr><td><code>removed</code></td><td>The version the parameter was removed in. Use the plain MediaWiki version number only.</td></tr>
</table>
== Ejemplos ==
<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}}
== Véase también ==
* {{tl|Parameter}} – older version of ApiParam
}}
[[Category:Typing-aid templates{{#translation:}}]]
[[Category:Formatting templates{{#translation:}}]]
</noinclude>
<languages />
</noinclude><includeonly>{{#switch:<!--
-->| =<!--
--><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|}}}| No more than {{{maxallowed}}} ({{#if:{{{maxallowedbot|}}}|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}} for bots) allowed.}}{{#if:{{{type|}}}| '''Type:''' {{{type}}}}}{{#if:{{{values|}}}| Possible values: {{{values}}}}}{{#if:{{{default|}}}| (Default: {{{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=
:''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.''
== Uso ==
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.
{{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>ApiParam parameters</th></tr>
<tr><th>Parameter Name</th><th>Description</th></tr>
<tr><td><code>'''name'''</code> ''(or first unnamed)''</td><td>The parameter name (required).</td></tr>
<tr><td><code>description</code> ''(or second unnamed)''</td><td>A description of the parameter.</td></tr>
<tr><td><code>required</code></td><td>Specify a value if the parameter is required. The name of the required parameter will be bolded.</td></tr>
<tr><td><code>maxallowed</code></td><td>For pipe-separated values or numeric quantities, the maximum allowed.</td></tr>
<tr><td><code>maxallowedbot</code></td><td>As above, for bots. If 50 or 500 is used for <code>maxallowed</code>, this will default to 500 or 5000, respectively.</td></tr>
<tr><td><code>type</code></td><td>The data type of the parameter.</td></tr>
<tr><td><code>values</code></td><td>A list of possible values for the parameter.</td></tr>
<tr><td><code>default</code></td><td>The default value for the parameter.</td></tr>
<tr><td><code>version</code></td><td>The version the parameter was introduced in. Use the plain MediaWiki version number only.</td></tr>
<tr><td><code>deprecated</code></td><td>The version the parameter was deprecated in. Use the plain MediaWiki version number only.</td></tr>
<tr><td><code>removed</code></td><td>The version the parameter was removed in. Use the plain MediaWiki version number only.</td></tr>
</table>
== Ejemplos ==
<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}}
== Véase también ==
* {{tl|Parameter}} – older version of ApiParam
}}
[[Category:Typing-aid templates{{#translation:}}]]
[[Category:Formatting templates{{#translation:}}]]
</noinclude>