MediaWiki API ヘルプ

このページは自動生成された MediaWiki API の説明文書ページです。

説明文書と例: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

prop=revisions (rv)

(main | query | revisions)
  • このモジュールは読み取りの権限を必要とします。
  • このモジュールはジェネレーターとして使用できます。
  • ソース: MediaWiki
  • ライセンス: GPL-2.0-or-later

版の情報を取得します。

May be used in several ways:

  1. Get data about a set of pages (last revision), by setting titles or pageids.
  2. Get revisions for one given page, by using titles or pageids with start, end, or limit.
  3. Get data about a set of revisions by setting their IDs with revids.
パラメーター:
Other general parameters are available.
rvprop

Which properties to get for each revision:

ids
版のID。
flags
Revision flags (minor).
timestamp
版のタイムスタンプ。
user
その版を作成した利用者。
userid
その版の作成者の利用者ID。
size
その版の長さ (バイト) 。
slotsize
Length (bytes) of each revision slot.
sha1
SHA-1 (base 16) of the revision. If the content has been revision deleted, a sha1hidden property will be returned.
slotsha1
SHA-1 (base 16) of each revision slot. If the content has been revision deleted, a sha1hidden property will be returned.
contentmodel
Content model ID of each revision slot.
comment
その版の利用者によるコメント。コメントが版指定削除されている場合、commenthiddenプロパティを返します。
parsedcomment
その版の利用者による、構文解析されたコメント。コメントが版指定削除されている場合、commenthiddenプロパティを返します。
content
各版スロットの内容。コンテンツが版削除された場合には、プロパティ texthidden を返します。
tags
その版のタグ。
roles
List content slot roles that exist in the revision.
parsetree
廃止予定です。 Use action=expandtemplates or action=parse instead. The XML parse tree of revision content (requires content model wikitext).
値 (| または別の文字列で区切る): comment、content、contentmodel、flags、ids、parsedcomment、roles、sha1、size、slotsha1、slotsize、tags、timestamp、user、userid、parsetree
既定: ids|timestamp|flags|comment|user
rvslots

Which revision slots to return data for, when slot-related properties are included in rvprops. If omitted, data from the main slot will be returned in a backwards-compatible format.

値 (| または別の文字列で区切る): main
すべての値を指定するには、*を用いてください。
rvlimit

返す版の数を制限する。

May only be used with a single page (mode #2).
型: 整数または max
値は1以上500以下です。
rvexpandtemplates
廃止予定です。

Use action=expandtemplates instead. Expand templates in revision content (requires rvprop=content).

型: 真偽値 (詳細)
rvgeneratexml
廃止予定です。

Use action=expandtemplates or action=parse instead. Generate XML parse tree for revision content (requires rvprop=content).

型: 真偽値 (詳細)
rvparse
廃止予定です。

Use action=parse instead. Parse revision content (requires rvprop=content). For performance reasons, if this option is used, rvlimit is enforced to 1.

型: 真偽値 (詳細)
rvsection

Only retrieve the content of the section with this identifier.

rvdiffto
廃止予定です。

Use action=compare instead. Revision ID to diff each revision to. Use prev, next and cur for the previous, next and current revision respectively.

rvdifftotext
廃止予定です。

Use action=compare instead. Text to diff each revision to. Only diffs a limited number of revisions. Overrides rvdiffto. If rvsection is set, only that section will be diffed against this text.

rvdifftotextpst
廃止予定です。

Use action=compare instead. Perform a pre-save transform on the text before diffing it. Only valid when used with rvdifftotext.

型: 真偽値 (詳細)
rvcontentformat
廃止予定です。

Serialization format used for rvdifftotext and expected for output of content.

値 (次の値のいずれか1つ): application/json、application/octet-stream、application/unknown、application/x-binary、text/css、text/javascript、text/plain、text/unknown、text/x-wiki、unknown/unknown
rvstartid

Start enumeration from this revision's timestamp. The revision must exist, but need not belong to this page.

May only be used with a single page (mode #2).
型: 整数
rvendid

Stop enumeration at this revision's timestamp. The revision must exist, but need not belong to this page.

May only be used with a single page (mode #2).
型: 整数
rvstart

From which revision timestamp to start enumeration.

May only be used with a single page (mode #2).
Type: timestamp (allowed formats)
rvend

列挙の終点となるタイムスタンプ。

May only be used with a single page (mode #2).
Type: timestamp (allowed formats)
rvdir

列挙の方向:

newer
古いものを先に表示します。注意: rvstart は rvend 以前でなければなりません。
older
新しいものを先に表示します (既定)。注意: rvstart は rvend 以降でなければなりません。
newer
List oldest first. Note: rvstart has to be before rvend.
older
List newest first (default). Note: rvstart has to be later than rvend.
May only be used with a single page (mode #2).
値 (次の値のいずれか1つ): newer、older
既定: older
rvuser

この利用者による版のみを結果に含める。

May only be used with a single page (mode #2).
型: 利用者名、IP、インターウィキの名前(例: "prefix>ExampleName") および 利用者ID(例: #12345)のいずれかを使った利用者
rvexcludeuser

この利用者による版を結果に含めない。

May only be used with a single page (mode #2).
型: 利用者名、IP、インターウィキの名前(例: "prefix>ExampleName") および 利用者ID(例: #12345)のいずれかを使った利用者
rvtag

このタグが付与された版のみを一覧表示する。

rvcontinue

When more results are available, use this to continue. More detailed information on how to continue queries can be found on mediawiki.org.

例:
ページAPI および きまぐれ手記 の最新版のデータと本文を取得する。
api.php?action=query&prop=revisions&titles=API|%E3%81%8D%E3%81%BE%E3%81%90%E3%82%8C%E6%89%8B%E8%A8%98&rvslots=*&rvprop=timestamp|user|comment|content [サンドボックスで開く]
きまぐれ手記 の直近の5版を取得する。
api.php?action=query&prop=revisions&titles=%E3%81%8D%E3%81%BE%E3%81%90%E3%82%8C%E6%89%8B%E8%A8%98&rvlimit=5&rvprop=timestamp|user|comment [サンドボックスで開く]
きまぐれ手記 の最初の5版を取得する。
api.php?action=query&prop=revisions&titles=%E3%81%8D%E3%81%BE%E3%81%90%E3%82%8C%E6%89%8B%E8%A8%98&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer [サンドボックスで開く]
きまぐれ手記 の 2006-05-01 以降の最初の改版5版を取得する。
api.php?action=query&prop=revisions&titles=%E3%81%8D%E3%81%BE%E3%81%90%E3%82%8C%E6%89%8B%E8%A8%98&rvlimit=5&rvprop=timestamp|user|comment&rvdir=newer&rvstart=2006-05-01T00:00:00Z [サンドボックスで開く]
Main Page の匿名利用者 127.0.0.1 以外による最初の5版を取得する。
api.php?action=query&prop=revisions&titles=%E3%81%8D%E3%81%BE%E3%81%90%E3%82%8C%E6%89%8B%E8%A8%98&rvlimit=5&rvprop=timestamp|user|comment&rvexcludeuser=127.0.0.1 [サンドボックスで開く]
きまぐれ手記 の利用者 MediaWiki default による最初の5版を取得する。
api.php?action=query&prop=revisions&titles=%E3%81%8D%E3%81%BE%E3%81%90%E3%82%8C%E6%89%8B%E8%A8%98&rvlimit=5&rvprop=timestamp|user|comment&rvuser=MediaWiki%20default [サンドボックスで開く]