MediaWiki API 說明
此頁為自動產生的 MediaWiki API 說明文件頁面。
說明文件與範例:https://www.mediawiki.org/wiki/API
prop=info (in)
- 此模組需要讀取權限。
- 來源:MediaWiki
- 協定:GPL-2.0-or-later
取得基本頁面訊息。
- inprop
要取得的額外屬性:
- protection
- 列出各頁面的保護層級。
- talkid
- 各非對話頁的對話頁頁面 ID。
- watched
- 列出各頁面的監視狀態。
- watchers
- 監視者的數目,如有允許的話。
- visitingwatchers
- 有訪問頁面近期編輯數的各頁面監視者數目,如有允許的話。
- notificationtimestamp
- 各頁面的監視清單通知時間戳記。
- subjectid
- 各對話頁的父頁面頁面 ID。
- url
- 为每个页面提供一个完整URL、一个编辑URL和规范URL。
- readable
- 已停用。 使用者是否可閱讀此頁面。
- preload
- 取得由 EditFormPreloadText 回傳的文字。
- displaytitle
- 在页面标题实际显示的地方提供方式。
- varianttitles
- 提供网站内容语言所有变体的显示标题。
- 多值 (以 | 或 alternative 分隔):protection、talkid、watched、watchers、visitingwatchers、notificationtimestamp、subjectid、url、readable、preload、displaytitle、varianttitles
- intestactions
測試目前使用者是否可執行頁面上的某項操作。
- 將幾個值以 | 或 alternative 分隔。 上限值為 50 (機器人為 500)。
- intestactionsdetail
Detail level for intestactions. Use the main module's errorformat and errorlang parameters to control the format of the messages returned.
- boolean
- Return a boolean value for each action.
- full
- Return messages describing why the action is disallowed, or an empty array if it is allowed.
- quick
- Like full but skipping expensive checks.
- 單值:boolean、full、quick
- 預設值:boolean
- intoken
- 已停用。
- 多值 (以 | 或 alternative 分隔):edit、delete、protect、move、block、unblock、email、import、watch
- incontinue
當有更多結果可用時,使用這個繼續。
- 取得有關頁面 Main Page 的資訊。
- api.php?action=query&prop=info&titles=Main%20Page [在沙盒中開啟]
- 取得有關 Main Page 的一般與保護資訊。
- api.php?action=query&prop=info&inprop=protection&titles=Main%20Page [在沙盒中開啟]
list=categorymembers (cm)
- 此模組需要讀取權限。
- 此模組可作為產生器使用。
- 來源:MediaWiki
- 協定:GPL-2.0-or-later
在指定的分類中列出所有頁面。
- cmtitle
所要列舉的分類(必要)。必須包含 分類: 前綴。不可與 cmpageid 一同使用。
- cmpageid
要列舉的分類之頁面 ID。不能與 cmtitle 同時使用。
- 類型:整數
- cmprop
要包含的資訊部份:
- ids
- 添加頁面 ID。
- title
- 添加標題與頁面的命名空間 ID。
- sortkey
- 添加使用來在分類裡排序的排序鍵(十六進位字串)。
- sortkeyprefix
- 添加用于分类中排序的关键字前缀(关键字的人类可读部分)。
- type
- 添加页面被分类的类型(page、subcat或file)。
- timestamp
- 添加在頁面有被包含時的時間戳記。
- 多值 (以 | 或 alternative 分隔):ids、title、sortkey、sortkeyprefix、type、timestamp
- 預設值:ids|title
- cmnamespace
仅包含这些名字空间的页面。注意cmtype=subcat或cmtype=file可能被使用,而不是cmnamespace=14或6。
- 多值 (以 | 或 alternative 分隔):0、1、2、3、4、5、6、7、8、9、10、11、12、13、14、15
- 要指定所有值,請使用*。
- cmtype
包含的分类成员类型。当cmsort=timestamp被设置时会忽略。
- 多值 (以 | 或 alternative 分隔):page、subcat、file
- 預設值:page|subcat|file
- cmcontinue
當有更多結果可用時,使用這個繼續。
- cmlimit
回傳的頁面數量上限。
- 不允許超過 500 (機器人為 5,000)。
- 類型:整數或max
- 預設值:10
- cmsort
作為排序順序的屬性。
- 單值:sortkey、timestamp
- 預設值:sortkey
- cmdir
排序的方向。
- 單值:asc、desc、ascending、descending、newer、older
- 預設值:ascending
- cmstart
起始列出的時間戳記。僅能與 cmsort=timestamp 一起使用。
- 類型:時間戳記(允許格式)
- cmend
結束列出的時間戳記。僅能與 cmsort=timestamp 一起使用。
- 類型:時間戳記(允許格式)
- cmstarthexsortkey
开始列举的关键词,由cmprop=sortkey返回。不能与cmsort=sortkey一起使用。
- cmendhexsortkey
结束列举的关键字,由cmprop=sortkey返回。只能与cmsort=sortkey一起使用。
- cmstartsortkeyprefix
要开始列举的排序关键词前缀。只能与cmsort=sortkey一起使用。覆盖cmstarthexsortkey。
- cmendsortkeyprefix
要结束列举before的关键字前缀(而不是at;如果此值出现,它将不被包括!)只能与cmsort=sortkey一起使用。覆盖cmendhexsortkey。
- cmstartsortkey
- 已停用。
請改用 cmstarthexsortkey。
- cmendsortkey
- 已停用。
請改用 cmendhexsortkey。
- 取得在 Category:Physics 裡前 10 項的頁面。
- api.php?action=query&list=categorymembers&cmtitle=Category:Physics [在沙盒中開啟]
- 取得在 Category:Physics 裡前 10 個頁面的頁面資訊。
- api.php?action=query&generator=categorymembers&gcmtitle=Category:Physics&prop=info [在沙盒中開啟]