עזרה של MediaWiki API
זהו דף תיעוד של API שנוצר באופן אוטומטי.
תיעוד ודוגמאות: https://www.mediawiki.org/wiki/API
action=userrights
(main | userrights)
- יחידה זו דורשת הרשאות קריאה.
- יחידה זו דורשת הרשאות כתיבה.
- יחידה זו מקבלת רק בקשות POST.
Change a user's group membership.
פרמטרים:
- user
User name.
- userid
User ID.
- add
Add the user to these groups.
- ערכים (מופרדים באמצעות "|"): bot, sysop, bureaucrat, emailconfirmed
- remove
Remove the user from these groups.
- ערכים (מופרדים באמצעות "|"): bot, sysop, bureaucrat, emailconfirmed
- reason
Reason for the change.
- ברירת מחדל: (ריק)
- token
אסימון "userrights" אוחזר מ־action=query&meta=tokens
לשם תאימות, גם האסימון שמשמש בממשק דפדפן מתקבל.
- פרמטר זה נדרש.
דוגמאות:
- 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
- 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