API:Meta/ja

From MediaWiki.org
Jump to: navigation, search
Tools clipart.png このページは MediaWiki API ドキュメントの一部です。
言語: English  • Deutsch • español • 日本語
MediaWiki API

メタクエリはページに関連しない情報を返します。

Contents

siteinfo / si [edit]

MediaWiki バージョン: 1.8

Siteinfo はサイト全体の情報を返します。The code for the siteinfo function is located at ApiQuerySiteinfo.php.

パラメータ [edit]

  • siprop: どのプロパティを取得するか
    • general: 一般的なサイト情報 (default)
    • namespaces: すべての名前空間のリスト
      Each namespace is given within its own element, which contains several attributes:
      • id an integer identification number which is unique for each namespace.
      • subpages if present, will always be a null attribute (subpages=""). This attribute indicates that subpages are allowed within the namespace. (MW 1.13+)
      • canonical Provides the canonical namespace name of the namespace, which may or may not be the same as the actual namespace name. For example, all wikis have a "Project:" namespace, but the actual namespace name is normally changed to the name of the wiki (on Wikipedia for example, the "Project:" namespace is "Wikipedia:"). (MW 1.14+)
      • content if present, will always be a null attribute (content=""). This attribute indicates that pages within this namespace should be treated as the main content of the wiki. Pages within namespaces with the content value set are counted for statistical purposes, among other things. (MW 1.16+)
      • case Either "first-letter" or "case-sensitive". If the first letter of the namespace name is capitalized (the default), then the value of this attribute will be "first-letter". Otherwise, the value will be "case-sensitive" in order to indicate that the namespace name in question intentionally does not use a capital first letter. Note: "case-sensitive" is reserved for future use (MW 1.16+)
    • statistics: Special:Statisticsに従ったサイトの統計情報, plus job queue (MW 1.11+)
    • dbrepllag: If sishowalldb is not set, provides information about the database server with the highest replication lag. If sishowalldb is set, shows replication lag for each database server. (MW 1.11+)
    • interwikimap: A list of each interwiki prefix, provided within its own element. (MW 1.11+)
      The attributes provided in each iw element include:
      • prefix Is the prefix of the interwiki link; this is used the same way as a namespace is used when editing.
      • local (if true) A boolean value indicating whether the wiki is in this project.
      • url The URL of the wiki, with "$1" as a placeholder for an article name.
      • language (if defined) The name of the language used by the wiki, derived by Language::fetchLanguageNames() from $wgExtraLanguageNames. (MW 1.13+)
      • wikiid The internal name of the database. (MW 1.18+)
      • api The URL of the file api.php. (MW 1.18+)
    • namespacealiases: A list of all namespace aliases (MW 1.13+)
    • specialpagealiases: A list of all special page aliases (MW 1.13+)
    • usergroups: A list of all user groups and their permissions (MW 1.13+)
    • extensions: A list of extensions installed on the wiki (MW 1.14+)
    • skins: A list of skins installed on the wiki (MW 1.18+)
    • magicwords: A list of magic words and their aliases (MW 1.14+)
    • fileextensions: A list of file extensions allowed to be uploaded (MW 1.15+)
    • rightsinfo: Get information about the license governing the wiki's content (MW 1.15+)
      • In the best case this will provide:
        • url which is what $wgRightsUrl contains (like a license URL)
        • text which is what $wgRightsText contains (like the license name) and is also provided with general
      • If $wgRightsPage is set, url is the URL to a page whose meaning has to be interpreted separately and is not output by the API
      • The API doesn't output whatever MediaWiki:Copyright contains
    • languages: Get available languages as seen in preferences (MW 1.16+)
  • sifilteriw: Criteria to filter the interwiki map by (ignored if siprop=interwikimap isn't set) (MW 1.11+)
    • local: Only list local interwiki prefixes
    • !local: Only list non-local interwiki prefixes
  • sishowalldb: Show information about all DB servers (ignored if siprop=dbrepllag isn't set) (MW 1.11+)
  • sinumberingroup: When set to true and siprop includes usergroups the number of users in each usergroup and the groups it can add/remove are included (MW 1.17+)

[edit]




起こり得るエラー [edit]

  • code: includeAllDenied
    • info: $wgShowHostnamesがtrueではない限りすべてのサーバ情報を閲覧できない

userinfo / ui [edit]

MediaWiki バージョン: 1.11

現在ログインしているユーザーに関する情報を返す。The code for the userinfo function is located at ApiQueryUserInfo.php.

パラメータ [edit]

  • uiprop: どのプロパティを取得するか
    • blockinfo: 現在のユーザーがだれによって、なぜブロックされているか
    • hasmsg: 現在のユーザーの会話ページ上に新しいメッセージがあるかどうか
    • groups: 現在のユーザーが所属しているグループ
    • rights: 現在のユーザーが所有している権限
    • changeablegroups: Which groups the current user can add/remove
    • options: 現在のユーザーが持っているプリファレンス
    • editcount: 現在のユーザーが行った編集回数
    • ratelimits: 現在のユーザーに適用されているレートリミット
    • realname: User's realname [1.18+]r79433
    • email: Email address and authentication timestamp in ISO 8601 format [1.15+]

[edit]

起こり得るエラー [edit]

なし。

allmessages / am [edit]

MediaWiki バージョン: 1.12

Lists the contents of all (or a few) interface messages.

パラメータ [edit]

  • ammessages: これらのメッセージのみを一覧表示する
  • amprop: Which properties to get, the only (default) prop is "default"
    • When the default is identical to the (custom) message, the prop is not added
  • amenableparser: Set to enable parser, will preprocess the wikitext of message. Will substitute magic words, handle templates etc.
  • amargs: Arguments to be substituted into message
  • amfilter: メッセージ名がこの文字を含むメッセージのみを一覧表示する
  • amlang: メッセージをこの言語に翻訳する
  • amfrom: Return messages starting at this message
  • amto: Return messages ending at this message

[edit]

起こり得るエラー [edit]

なし。