Pomoc MediaWiki API
To jest automatycznie wygenerowana strona dokumentacji MediaWiki API. Dokumentacja i przykłady: https://www.mediawiki.org/wiki/API
action=userrights
- Ten moduł wymaga praw odczytu.
- Ten moduł wymaga praw zapisu.
- Ten moduł akceptuje tylko żądania POST.
- Źródło: MediaWiki
- Licencja: GPL-2.0-or-later
Change a user's group membership.
- user
- Nazwa użytkownika. 
- Typ: nazwa użytkownika
- userid
- Identyfikator użytkownika. 
- Typ: liczba całkowita
- add
- Dodaj użytkownika do tych grup, lub, jeżeli jest już ich członkiem, zmień czas wygaśnięcia członkostwa w tych grupach. 
- Wartości (oddziel za pomocą | lub alternatywy): bot, sysop, bureaucrat
- expiry
- Expiry timestamps. May be relative (e.g. 5 months or 2 weeks) or absolute (e.g. 2014-09-18T12:34:56Z). If only one timestamp is set, it will be used for all groups passed to the add parameter. Use infinite, indefinite, infinity, or never for a never-expiring user group. 
- Oddziel wartości za pomocą | lub alternatywy. Maksymalna liczba wartości to 50 (500 dla botów).
- Domyślnie: infinite
- remove
- Usuń użytkownika z tych grup. 
- Wartości (oddziel za pomocą | lub alternatywy): bot, sysop, bureaucrat
- reason
- Powód zmiany. 
- Domyślnie: (puste)
- token
- Token "userrights" zdobyty z action=query&meta=tokens - For compatibility, the token used in the web UI is also accepted. 
- Ten parametr jest wymagany.
- tags
- Change tags to apply to the entry in the user rights log. 
- Wartości (oddziel za pomocą | lub alternatywy):
- Add user FooBot to group bot, and remove from groups sysop and bureaucrat.
- api.php?action=userrights&user=FooBot&add=bot&remove=sysop|bureaucrat&token=123ABC [otwórz w brudnopisie]
- Add the user with ID 123 to group bot, and remove from groups sysop and bureaucrat.
- api.php?action=userrights&userid=123&add=bot&remove=sysop|bureaucrat&token=123ABC [otwórz w brudnopisie]
- Add user SometimeSysop to group sysop for 1 month.
- api.php?action=userrights&user=SometimeSysop&add=sysop&expiry=1%20month&token=123ABC [otwórz w brudnopisie]