עזרה של MediaWiki API

זהו דף תיעוד של API שנוצר באופן אוטומטי.

תיעוד ודוגמאות: https://www.mediawiki.org/wiki/API

action=compare

(main | compare)
  • יחידה זו דורשת הרשאות קריאה.
  • מקור: MediaWiki
  • רישיון: GPL-2.0-or-later

קבלת ההבדל בין 2 דפים.

יש להעביר מספר גרסה, כותרת דף או מזהה דף גם ל־"from" וגם ל־"to".

פרמטרים:
fromtitle

כותרת ראשונה להשוואה.

fromid

מס׳ זיהוי של הדף הראשון להשוואה.

סוג: מספר שלם
fromrev

גרסה ראשונה להשוואה.

סוג: מספר שלם
fromslots

Override content of the revision specified by fromtitle, fromid or fromrev.

This parameter specifies the slots that are to be modified. Use fromtext-{slot}, fromcontentmodel-{slot}, and fromcontentformat-{slot} to specify content for each slot.

ערכים (מופרדים באמצעות "|" או or תו חלופי): main
fromtext-{slot}

Text of the specified slot. If omitted, the slot is removed from the revision.

זהו פרמטר בתבנית. בעת ביצוע הבקשה, יש להחליף את הטקסט {slot} (בשם הפרמטר) עם הערכים של הפרמטר fromslots.
fromsection-{slot}

When fromtext-{slot} is the content of a single section, this is the section number. It will be merged into the revision specified by fromtitle, fromid or fromrev as if for a section edit.

זהו פרמטר בתבנית. בעת ביצוע הבקשה, יש להחליף את הטקסט {slot} (בשם הפרמטר) עם הערכים של הפרמטר fromslots.
fromcontentformat-{slot}

Content serialization format of fromtext-{slot}.

זהו פרמטר בתבנית. בעת ביצוע הבקשה, יש להחליף את הטקסט {slot} (בשם הפרמטר) עם הערכים של הפרמטר fromslots.
אחד מהערכים הבאים: text/x-wiki, text/javascript, application/json, text/css, text/plain
fromcontentmodel-{slot}

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

זהו פרמטר בתבנית. בעת ביצוע הבקשה, יש להחליף את הטקסט {slot} (בשם הפרמטר) עם הערכים של הפרמטר fromslots.
אחד מהערכים הבאים: wikitext, javascript, json, css, text
frompst

לעשות התמרה לפני שמירה ב־fromtext.

סוג: בוליאני (פרטים)
fromtext
מיושן.

להשתמש בטקסט הזה במקום תוכן הגרסה שהוגדרה על־ידי fromtitle, fromid או fromrev.

fromcontentformat
מיושן.

תסדיר הסדרת תוכן של fromtext.

אחד מהערכים הבאים: text/x-wiki, text/javascript, application/json, text/css, text/plain
fromcontentmodel
מיושן.

מודל התוכן של fromtext. אם זה לא סופק, ייעשה ניחוש על סמך פרמטרים אחרים.

אחד מהערכים הבאים: wikitext, javascript, json, css, text
fromsection
מיושן.

יש להשתמש רק בפסקה שצוינה בתוכן של הפרמטר 'from'.

totitle

כותרת שנייה להשוואה.

toid

מס׳ מזהה של הדף השני להשוואה.

סוג: מספר שלם
torev

גרסה שנייה להשוואה.

סוג: מספר שלם
torelative

להשתמש בגרסה יחסית לגרסה שהוסקה מfromtitle, fromid או fromrev. לכל אפשריות ה־"to" האחרות לא תהיה השפעה.

אחד מהערכים הבאים: prev, next, cur
toslots

Override content of the revision specified by totitle, toid or torev.

This parameter specifies the slots that are to be modified. Use totext-{slot}, tocontentmodel-{slot}, and tocontentformat-{slot} to specify content for each slot.

ערכים (מופרדים באמצעות "|" או or תו חלופי): main
totext-{slot}

Text of the specified slot. If omitted, the slot is removed from the revision.

זהו פרמטר בתבנית. בעת ביצוע הבקשה, יש להחליף את הטקסט {slot} (בשם הפרמטר) עם הערכים של הפרמטר toslots.
tosection-{slot}

When totext-{slot} is the content of a single section, this is the section number. It will be merged into the revision specified by totitle, toid or torev as if for a section edit.

זהו פרמטר בתבנית. בעת ביצוע הבקשה, יש להחליף את הטקסט {slot} (בשם הפרמטר) עם הערכים של הפרמטר toslots.
tocontentformat-{slot}

Content serialization format of totext-{slot}.

זהו פרמטר בתבנית. בעת ביצוע הבקשה, יש להחליף את הטקסט {slot} (בשם הפרמטר) עם הערכים של הפרמטר toslots.
אחד מהערכים הבאים: text/x-wiki, text/javascript, application/json, text/css, text/plain
tocontentmodel-{slot}

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

זהו פרמטר בתבנית. בעת ביצוע הבקשה, יש להחליף את הטקסט {slot} (בשם הפרמטר) עם הערכים של הפרמטר toslots.
אחד מהערכים הבאים: wikitext, javascript, json, css, text
topst

לעשות התמרה לפני שמירה ב־totext.

סוג: בוליאני (פרטים)
totext
מיושן.

להשתמש בטקסט הזה במקום התוכן של הגרסה שהוגדר ב־totitle, toid or torev.

tocontentformat
מיושן.

תסדיר הסדרת תוכן של fromtext.

אחד מהערכים הבאים: text/x-wiki, text/javascript, application/json, text/css, text/plain
tocontentmodel
מיושן.

מודל התוכן של totext. אם זה לא סופק, ייעשה ניחוש על סמך פרמטרים אחרים.

אחד מהערכים הבאים: wikitext, javascript, json, css, text
tosection
מיושן.

יש להשתמש רק בפסקה שצוינה בתוכן של הפרמטר 'to'.

prop

אילו פריטי מידע לקבל.

diff
ה־HTML של ההשוואה.
diffsize
גודל ה־HTML של ההשוואה, בבתים.
rel
מזהי הגרסאות של הגרסאות לפני "from" ואחרי "to", אם יש כאלה.
ids
מזהי הדף והגרסה של גרסאות ה־"from" וה־"to".
title
כותרות הדפים של גרסאות ה־"from" וה־"to".
user
השם והמזהה של המשתמש של גרסאות ה־"from" וה־"to".
comment
התקציר על גרסאות ה־"from" וה־"to".
parsedcomment
התקציר המפוענח על גרסאות ה־"from" וה־"to".
size
הגודל של גרסאות ה־"from" וה־"to".
ערכים (מופרדים באמצעות "|" או or תו חלופי): diff, diffsize, rel, ids, title, user, comment, parsedcomment, size
ברירת מחדל: diff|ids|title
slots

Return individual diffs for these slots, rather than one combined diff for all slots.

ערכים (מופרדים באמצעות "|" או or תו חלופי): main
כדי לתת את כל הערכים, יש להשתמש ב־*.
דוגמה:
יצירת תיעוד שינוי בין גרסה 1 ל־2.
api.php?action=compare&fromrev=1&torev=2 [פתיחה בארגז חול]