MediaWiki API 帮助

这是自动生成的MediaWiki API文档页面。

文档和例子:-{R|https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page}-

action=regexblock

main | regexblock
  • 此模块需要读取权限。
  • 此模块需要写入权限。
  • 此模块只允许POST请求。
  • 来源:RegexBlock
  • 许可协议:GPL-2.0-or-later

通过正则表达式封禁用户的名称和IP地址。

参数:
regex

The regular expression to block. Note that when the "exact" param is given in the URL, this is not treated as a regular expression but rather as a simple string.

这个参数是必需的。
expiry

Expiry time. May be relative (e.g. 5 months or 2 weeks) or absolute (e.g. 2014-09-18T12:34:56Z). If set to infinite, indefinite, or never, the block will never expire.

默认:never
reason

Reason for block.

默认:(空)
nocreate

Prevent account creation.

类型:布尔型 (详情)
exact

Use exact matching to block the given name precisely as given (as opposed to treating it as a regular expression).

类型:布尔型 (详情)
token

action=query&meta=tokens取回的“csrf”令牌

这个参数是必需的。
例子:
Block the exact IP address "192.0.2.5" for three days with the reason "First strike"
api.php?action=regexblock&regex=192.0.2.5&expiry=3%20days&reason=First%20strike&exact=&token=123ABC [在沙盒中打开]
Block the regular expression "SpamUser.*" permanently, which blocks any and all users whose user name matches that expression, such as "SpamUser65", with the reason "Bad username" and also prevent any and all users whose user name matches the regular expression from creating new user accounts.
api.php?action=regexblock&regex=SpamUser.*&expiry=never&reason=Bad%20username&nocreate=&token=123ABC [在沙盒中打开]