MediaWiki API ヘルプ

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

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

action=compare

(main | compare)
  • このモジュールは読み取りの権限を必要とします。
  • Source: MediaWiki
  • License: GPL-2.0-or-later

2つの版間の差分を取得します。

"from" と "to" の両方の版番号、ページ名、もしくはページIDを渡す必要があります。

パラメーター:
fromtitle

比較する1つ目のページ名。

fromid

比較する1つ目のページID。

Type: integer
fromrev

比較する1つ目の版。

Type: integer
fromtext

Use this text instead of the content of the revision specified by fromtitle, fromid or fromrev.

fromsection

Only use the specified section of the specified 'from' content.

frompst

Do a pre-save transform on fromtext.

Type: boolean (details)
fromcontentformat

Content serialization format of fromtext.

値 (次の値のいずれか1つ): application/json、text/x-wiki、text/javascript、text/css、text/plain
fromcontentmodel

Content model of fromtext. If not supplied, it will be guessed based on the other parameters.

値 (次の値のいずれか1つ): GadgetDefinition、wikitext、javascript、json、css、text
totitle

比較する2つ目のページ名。

toid

比較する2つ目のページID。

Type: integer
torev

比較する2つ目の版。

Type: integer
torelative

Use a revision relative to the revision determined from fromtitle, fromid or fromrev. All of the other 'to' options will be ignored.

値 (次の値のいずれか1つ): prev、next、cur
totext

Use this text instead of the content of the revision specified by totitle, toid or torev.

tosection

Only use the specified section of the specified 'to' content.

topst

Do a pre-save transform on totext.

Type: boolean (details)
tocontentformat

Content serialization format of totext.

値 (次の値のいずれか1つ): application/json、text/x-wiki、text/javascript、text/css、text/plain
tocontentmodel

Content model of totext. If not supplied, it will be guessed based on the other parameters.

値 (次の値のいずれか1つ): GadgetDefinition、wikitext、javascript、json、css、text
prop

Which pieces of information to get.

;diff:The diff HTML.

;diffsize:The size of the diff HTML, in bytes.

;rel:The revision IDs of the revision previous to 'from' and after 'to', if any.

;ids:The page and revision IDs of the 'from' and 'to' revisions.

;title:The page titles of the 'from' and 'to' revisions.

;user:The user name and ID of the 'from' and 'to' revisions.

;comment:The comment on the 'from' and 'to' revisions.

;parsedcomment:The parsed comment on the 'from' and 'to' revisions.

;size:The size of the 'from' and 'to' revisions.

値 (|もしくは別の文字列で区切る): diff、diffsize、rel、ids、title、user、comment、parsedcomment、size
既定値: diff|ids|title