API:Protect/ru

POST request to change a page's protection level.

Пример
Protecting a page is a multi-step process:  Log in using one of the methods described in . Get a. This token is the same for all pages, but changes at every login.

 Send a POST request with the CSRF token in order to protect the page. 

The sample code below covers the third step in detail.

Пример кода
protect.py

Возможные ошибки
В дополнение к обычным ошибкам:

История параметров

 * v1.27: Введены
 * v1.20: Введены
 * v1.17: Введены . Устарели
 * v1.15: Введены

Additional Notes

 * This module requires  rights.
 * For MediaWiki versions 1.19 and earlier, you can obtain a protect token through.
 * For MediaWiki 1.20-1.23, you can obtain a protect token through.

См. также

 * - Get a list of titles protected from creation.