Шаблон:ApiParam/zh

Материал из База знаний VINTEO

<languages />

{{#switch:<translate></translate> | =

Документация шаблона
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.

用法

此模板可用于记载API参数。 Its intent is to harmonize the appearance of template parameters across all of the API pages.

Шаблон:Pre2

ApiParam parameters
Parameter NameDescription
name (or first unnamed)The parameter name (required).
description (or second unnamed)A description of the parameter.
requiredSpecify a value if the parameter is required. The name of the required parameter will be bolded.
maxallowedFor pipe-separated values or numeric quantities, the maximum allowed.
maxallowedbotAs above, for bots. If 50 or 500 is used for maxallowed, this will default to 500 or 5000, respectively.
typeThe data type of the parameter.
valuesA list of possible values for the parameter.
defaultThe default value for the parameter.
versionThe version the parameter was introduced in. Use the plain MediaWiki version number only.
deprecatedThe version the parameter was deprecated in. Use the plain MediaWiki version number only.
removedThe version the parameter was removed in. Use the plain MediaWiki version number only.

示例

*{{ApiParam|rcid|One or more recent changes IDs from  which to add or remove the tag.|maxallowed=50}}
  • {{#switch:<translate></translate>| =rcid{{#if:One or more recent changes IDs from which to add or remove the tag.|: One or more recent changes IDs from which to add or remove the tag.}}{{#if:50| <translate> No more than <tvar|1>50</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:50|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:| (<translate> Default:</translate> {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =rcid{{#if:One or more recent changes IDs from which to add or remove the tag.|: One or more recent changes IDs from which to add or remove the tag.}}{{#if:50| 不允许超过50(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:50|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:| (默认: {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}
*{{ApiParam|siprop|Which properties to get|default=general}}
**{{ApiParam|general|General site information}}
***{{ApiParam|articlepath|{{ll|Manual:$wgArticlePath|$wgArticlePath}}|version=1.15}}
  • {{#switch:<translate></translate>| =siprop{{#if:Which properties to get|: Which properties to get}}{{#if:| <translate> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:general| (<translate> Default:</translate> general)}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =siprop{{#if:Which properties to get|: Which properties to get}}{{#if:| 不允许超过{{{maxallowed}}}(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:general| (默认: general)}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}
    • {{#switch:<translate></translate>| =general{{#if:General site information|: General site information}}{{#if:| <translate> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:| (<translate> Default:</translate> {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =general{{#if:General site information|: General site information}}{{#if:| 不允许超过{{{maxallowed}}}(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:| (默认: {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}

参见

| #default=

 {{#switch:

| =

Документация шаблона
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.

用法

此模板可用于记载API参数。 Its intent is to harmonize the appearance of template parameters across all of the API pages.

Шаблон:Pre2

ApiParam parameters
Parameter NameDescription
name (or first unnamed)The parameter name (required).
description (or second unnamed)A description of the parameter.
requiredSpecify a value if the parameter is required. The name of the required parameter will be bolded.
maxallowedFor pipe-separated values or numeric quantities, the maximum allowed.
maxallowedbotAs above, for bots. If 50 or 500 is used for maxallowed, this will default to 500 or 5000, respectively.
typeThe data type of the parameter.
valuesA list of possible values for the parameter.
defaultThe default value for the parameter.
versionThe version the parameter was introduced in. Use the plain MediaWiki version number only.
deprecatedThe version the parameter was deprecated in. Use the plain MediaWiki version number only.
removedThe version the parameter was removed in. Use the plain MediaWiki version number only.

示例

*{{ApiParam|rcid|One or more recent changes IDs from  which to add or remove the tag.|maxallowed=50}}
  • {{#switch:<translate></translate>| =rcid{{#if:One or more recent changes IDs from which to add or remove the tag.|: One or more recent changes IDs from which to add or remove the tag.}}{{#if:50| <translate> No more than <tvar|1>50</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:50|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:| (<translate> Default:</translate> {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =rcid{{#if:One or more recent changes IDs from which to add or remove the tag.|: One or more recent changes IDs from which to add or remove the tag.}}{{#if:50| 不允许超过50(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:50|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:| (默认: {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}
*{{ApiParam|siprop|Which properties to get|default=general}}
**{{ApiParam|general|General site information}}
***{{ApiParam|articlepath|{{ll|Manual:$wgArticlePath|$wgArticlePath}}|version=1.15}}
  • {{#switch:<translate></translate>| =siprop{{#if:Which properties to get|: Which properties to get}}{{#if:| <translate> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:general| (<translate> Default:</translate> general)}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =siprop{{#if:Which properties to get|: Which properties to get}}{{#if:| 不允许超过{{{maxallowed}}}(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:general| (默认: general)}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}
    • {{#switch:<translate></translate>| =general{{#if:General site information|: General site information}}{{#if:| <translate> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:| (<translate> Default:</translate> {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =general{{#if:General site information|: General site information}}{{#if:| 不允许超过{{{maxallowed}}}(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:| (默认: {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}

参见

| #default=

 Ошибка Lua: expandTemplate: template loop detected.

}}{{#if::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.

用法

此模板可用于记载API参数。 Its intent is to harmonize the appearance of template parameters across all of the API pages.

Шаблон:Pre2

ApiParam parameters
Parameter NameDescription
name (or first unnamed)The parameter name (required).
description (or second unnamed)A description of the parameter.
requiredSpecify a value if the parameter is required. The name of the required parameter will be bolded.
maxallowedFor pipe-separated values or numeric quantities, the maximum allowed.
maxallowedbotAs above, for bots. If 50 or 500 is used for maxallowed, this will default to 500 or 5000, respectively.
typeThe data type of the parameter.
valuesA list of possible values for the parameter.
defaultThe default value for the parameter.
versionThe version the parameter was introduced in. Use the plain MediaWiki version number only.
deprecatedThe version the parameter was deprecated in. Use the plain MediaWiki version number only.
removedThe version the parameter was removed in. Use the plain MediaWiki version number only.

示例

*{{ApiParam|rcid|One or more recent changes IDs from  which to add or remove the tag.|maxallowed=50}}
  • {{#switch:<translate></translate>| =rcid{{#if:One or more recent changes IDs from which to add or remove the tag.|: One or more recent changes IDs from which to add or remove the tag.}}{{#if:50| <translate> No more than <tvar|1>50</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:50|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:| (<translate> Default:</translate> {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =rcid{{#if:One or more recent changes IDs from which to add or remove the tag.|: One or more recent changes IDs from which to add or remove the tag.}}{{#if:50| 不允许超过50(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:50|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:| (默认: {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}
*{{ApiParam|siprop|Which properties to get|default=general}}
**{{ApiParam|general|General site information}}
***{{ApiParam|articlepath|{{ll|Manual:$wgArticlePath|$wgArticlePath}}|version=1.15}}
  • {{#switch:<translate></translate>| =siprop{{#if:Which properties to get|: Which properties to get}}{{#if:| <translate> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:general| (<translate> Default:</translate> general)}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =siprop{{#if:Which properties to get|: Which properties to get}}{{#if:| 不允许超过{{{maxallowed}}}(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:general| (默认: general)}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}
    • {{#switch:<translate></translate>| =general{{#if:General site information|: General site information}}{{#if:| <translate> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:| (<translate> Default:</translate> {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =general{{#if:General site information|: General site information}}{{#if:| 不允许超过{{{maxallowed}}}(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:| (默认: {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}

参见

[[Category:Template documentation pages{{#translation:}}]] }} }}{{#if::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.

用法

此模板可用于记载API参数。 Its intent is to harmonize the appearance of template parameters across all of the API pages.

Шаблон:Pre2

ApiParam parameters
Parameter NameDescription
name (or first unnamed)The parameter name (required).
description (or second unnamed)A description of the parameter.
requiredSpecify a value if the parameter is required. The name of the required parameter will be bolded.
maxallowedFor pipe-separated values or numeric quantities, the maximum allowed.
maxallowedbotAs above, for bots. If 50 or 500 is used for maxallowed, this will default to 500 or 5000, respectively.
typeThe data type of the parameter.
valuesA list of possible values for the parameter.
defaultThe default value for the parameter.
versionThe version the parameter was introduced in. Use the plain MediaWiki version number only.
deprecatedThe version the parameter was deprecated in. Use the plain MediaWiki version number only.
removedThe version the parameter was removed in. Use the plain MediaWiki version number only.

示例

*{{ApiParam|rcid|One or more recent changes IDs from  which to add or remove the tag.|maxallowed=50}}
  • {{#switch:<translate></translate>| =rcid{{#if:One or more recent changes IDs from which to add or remove the tag.|: One or more recent changes IDs from which to add or remove the tag.}}{{#if:50| <translate> No more than <tvar|1>50</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:50|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:| (<translate> Default:</translate> {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =rcid{{#if:One or more recent changes IDs from which to add or remove the tag.|: One or more recent changes IDs from which to add or remove the tag.}}{{#if:50| 不允许超过50(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:50|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:| (默认: {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}
*{{ApiParam|siprop|Which properties to get|default=general}}
**{{ApiParam|general|General site information}}
***{{ApiParam|articlepath|{{ll|Manual:$wgArticlePath|$wgArticlePath}}|version=1.15}}
  • {{#switch:<translate></translate>| =siprop{{#if:Which properties to get|: Which properties to get}}{{#if:| <translate> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:general| (<translate> Default:</translate> general)}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =siprop{{#if:Which properties to get|: Which properties to get}}{{#if:| 不允许超过{{{maxallowed}}}(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:general| (默认: general)}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}
    • {{#switch:<translate></translate>| =general{{#if:General site information|: General site information}}{{#if:| <translate> No more than <tvar|1>{{{maxallowed}}}</> (<tvar|2>{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}}</> for bots) allowed.</translate>}}{{#if:| <translate> Type:</translate> {{{type}}}}}{{#if:| <translate> Possible values:</translate> {{{values}}}}}{{#if:| (<translate> Default:</translate> {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default={{#switch:| =general{{#if:General site information|: General site information}}{{#if:| 不允许超过{{{maxallowed}}}(对于机器人则是{{#if:|{{{maxallowedbot}}}|{{#switch:{{{maxallowed}}}|50=500|500=5000}}}})。}}{{#if:| 类型: {{{type}}}}}{{#if:| 可能的值: {{{values}}}}}{{#if:| (默认: {{{default}}})}}{{#if:| Шаблон:MW version-inline}}{{#if:| Шаблон:Deprecated-inline}}{{#if:| Шаблон:Removed-inline}}| #default=Ошибка Lua: expandTemplate: template loop detected.}}}}

参见

[[Category:Template documentation pages{{#translation:}}]] }} [[Category:Typing-aid templates{{#translation:}}]] [[Category:Formatting templates{{#translation:}}]]