MediaWiki API ヘルプ
このページは自動生成された MediaWiki API の説明文書ページです。
説明文書と例: 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.
- この変数は必須です。
- 値 (次の値のいずれか1つ): 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 [サンドボックスで開く]