MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

action=compare

(main | compare)
  • This module requires read rights.
  • منبع: MediaWiki
  • License: GPL-2.0+

تفاوت بین ۲ صفحه را بیابید.

شما باید یک شماره بازبینی، یک عنوان صفحه، یا یک شناسه صفحه برای هر دو «از» و «به» مشخص کنید.

Parameters:
fromtitle

عنوان اول برای مقایسه.

fromid

شناسه صفحه اول برای مقایسه.

Type: integer
fromrev

نسخه اول برای مقایسه.

Type: integer
fromtext

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

frompst

Do a pre-save transform on fromtext.

Type: boolean (details)
fromcontentformat

Content serialization format of fromtext.

One of the following values: 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.

One of the following values: GadgetDefinition، wikitext، javascript، json، css، text
totitle

عنوان دوم برای مقایسه.

toid

شناسه صفحه دوم برای مقایسه.

Type: integer
torev

نسخه دوم برای مقایسه.

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.

One of the following values: prev، next، cur
totext

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

topst

Do a pre-save transform on totext.

Type: boolean (details)
tocontentformat

Content serialization format of totext.

One of the following values: 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.

One of the following values: GadgetDefinition، wikitext، javascript، json، css، text
prop

Which pieces of information to get.

diff
تفاوت اچ‌تی‌ام‌ال.
diffsize
اندازهٔ تفاوت اچ‌تی‌ام‌ال، به بایت.
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.
Values (separate with | or alternative): diff، diffsize، rel، ids، title، user، comment، parsedcomment، size
پیش‌فرض: diff|ids|title
Example:
ایجاد تفاوت بین نسخه 1 و 2
api.php?action=compare&fromrev=1&torev=2 [open in sandbox]