Pomoc MediaWiki API

To jest automatycznie wygenerowana strona dokumentacji MediaWiki API. Dokumentacja i przykłady: https://www.mediawiki.org/wiki/API

action=protect

(main | protect)
  • Ten moduł wymaga praw odczytu.
  • Ten moduł wymaga praw zapisu.
  • Ten moduł akceptuje tylko żądania POST.

Change the protection level of a page.

Parametry:
title

Title of the page to (un)protect. Cannot be used together with pageid.

pageid

ID of the page to (un)protect. Cannot be used together with title.

protections

List of protection levels, formatted action=level (e.g. edit=sysop).

Note: Any actions not listed will have restrictions removed.

Ten parametr jest wymagany.
Oddziel wartości za pomocą |. Maksymalna ilość wartości to 50 (500 dla botów).
expiry

Expiry timestamps. If only one timestamp is set, it'll be used for all protections. Use infinite, indefinite, infinity, or never, for a never-expiring protection.

Oddziel wartości za pomocą |. Maksymalna ilość wartości to 50 (500 dla botów).
Domyślnie: infinite
reason

Reason for (un)protecting.

Domyślnie: (puste)
cascade

Enable cascading protection (i.e. protect pages included in this page). Ignored if all protection levels given do not support cascading.

watch
Przestarzałe.

If set, add the page being (un)protected to the current user's watchlist.

watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

Jedna wartość: watch, unwatch, preferences, nochange
Domyślnie: preferences
token

A "csrf" token retrieved from action=query&meta=tokens

Ten parametr jest wymagany.