MediaWiki API 帮助
这是自动生成的MediaWiki API文档页面。
文档和例子:-{R|https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page}-
action=spamregex
(main | spamregex)
- 此模块需要读取权限。
- 此模块需要写入权限。
- 此模块只允许POST请求。
- 来源:Regular Expression Spam Block
- 许可协议:GPL-2.0-or-later
Add entries to SpamRegex or remove already blocked entries from it.
参数:
- do
What to do? Either add or delete.
- 这个参数是必需的。
- 以下值中的一个:add、delete
- modes
Block modes, i.e. should the phrase we're trying to block be blocked in page content (text), edit summaries (summary) or both?
- 值(以|或替代物分隔):summary、text
- phrase
The spam phrase to be blocked or removed from SpamRegex.
- 这个参数是必需的。
- reason
Reason for adding an entry to SpamRegex. Mandatory when adding entries, not used when deleting.
- token
从action=query&meta=tokens取回的“csrf”令牌
- 这个参数是必需的。
例子:
- Add the phrase "FooBar" with the reason "Cross-wiki spam" to SpamRegex, blocking it both in page text as well as in edit summaries
- api.php?action=spamregex&do=add&phrase=FooBar&reason=Cross-wiki%20spam&modes=summary|text&token=123ABC [在沙盒中打开]
- Remove the phrase "Test, just a test" from SpamRegex
- api.php?action=spamregex&do=delete&phrase=Test,%20just%20a%20test&token=123ABC [在沙盒中打开]