MediaWiki API 幫助
這是自動(dòng)生成的MediaWiki API文檔頁(yè)面。
文檔和例子:https://www.mediawiki.org/wiki/API:Main_page/zh
meta=userinfo (ui)
- 此模塊需要讀取權(quán)限。
- 來(lái)源:MediaWiki
- 許可協(xié)議:GPL-2.0+
獲取有關(guān)當(dāng)前用戶的信息。
參數(shù):
- uiprop
要包含的信息束:
- blockinfo
- 如果當(dāng)前用戶被封禁就標(biāo)記,并注明是誰(shuí)封禁,以何種原因封禁的。
- hasmsg
- 如果當(dāng)前用戶有等待中的消息的話,添加標(biāo)簽messages。
- groups
- 列舉當(dāng)前用戶隸屬的所有群組。
- implicitgroups
- 列舉當(dāng)前用戶的所有自動(dòng)成為成員的用戶組。
- rights
- 列舉當(dāng)前用戶擁有的所有權(quán)限。
- changeablegroups
- Lists the groups the current user can add to and remove from.
- options
- Lists all preferences the current user has set.
- preferencestoken
- 已棄用。獲取令牌以更改當(dāng)前用戶的參數(shù)設(shè)置。
- editcount
- 添加當(dāng)前用戶的編輯計(jì)數(shù)。
- ratelimits
- Lists all rate limits applying to the current user.
- Adds the user's email address and email authentication date.
- realname
- 添加用戶的真實(shí)姓名。
- acceptlang
- Echoes the
Accept-Languageheader sent by the client in a structured format. - registrationdate
- 添加用戶的注冊(cè)時(shí)間。
- unreadcount
- Adds the count of unread pages on the user's watchlist (maximum 999; returns 1000+ if more).
- centralids
- 添加中心ID并為用戶附加狀態(tài)。
- 值(以|分隔):blockinfo、hasmsg、groups、implicitgroups、rights、changeablegroups、options、preferencestoken、editcount、ratelimits、email、realname、acceptlang、registrationdate、unreadcount、centralids
- uiattachedwiki
與uiprop=centralids一起使用,表明用戶是否附加于此ID定義的wiki。
例子:
- 獲取有關(guān)當(dāng)前用戶的信息。
- api.php?action=query&meta=userinfo [在沙盒中打開]
- 獲取有關(guān)當(dāng)前用戶的額外信息。
- api.php?action=query&meta=userinfo&uiprop=blockinfo|groups|rights|hasmsg [在沙盒中打開]