MediaWiki API ajuda
Esta es una pàgina de documentació autogenerada de l'API de MediaWiki.
Documentació i eixemples: https://www.mediawiki.org/wiki/API
action=compare
- Este mòdul requerix permissos de llectura.
- Font: MediaWiki
- Llicència: GPL-2.0-or-later
Obtindre la diferència entre 2 pàgines.
Se debe pasar un número de revisión, un título de página o una ID tanto desde "de" hasta "a".
- fromtitle
Primer títul per a comparar
- fromid
ID de la primera pàgina a comparar.
- Tipo: entero
- fromrev
Primera revisió per a comparar.
- Tipo: entero
- fromslots
Reemplazar el contenido de la revisión especificada por fromtitle, fromid o fromrev.
Este parámetro especifica las ranuras que se van a modificar. Utiliza desde texto-{ranura}, desde modelo de contenido-{ranura} y desde formato de contenido-{ranura} para especificar el contenido de cada ranura.
- Valors (separats per | u atre separador): main
- fromtext-{slot}
Texto de la ranura especificada. Si se omite, la ranura se quita de la revisión.
- This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of fromslots.
- fromsection-{slot}
Cuando fromtext-{slot} es el contenido de una sola sección, este es el número de sección. Se combinará en la revisión especificada por fromtitle, fromid o fromrev como si se tratara de una edición de sección.
- This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of fromslots.
- fromcontentformat-{slot}
Formato de serialización de contenido de desde texto-{ranura}.
- This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of fromslots.
- U dels següents valors: application/json, text/css, text/javascript, text/plain, text/x-wiki
- fromcontentmodel-{slot}
Modelo de contenido de from text-{slot}. Si no se suministra, se calculará en función de los demás parámetros.
- This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of fromslots.
- U dels següents valors: GadgetDefinition, Scribunto, css, javascript, json, sanitized-css, text, wikitext
- frompst
Realisar una transformació prèvia al guardat en fromtext-{slot}.
- Tipo: boolean (detalls)
- fromtext
- En desús.
Especificar fromslots=main i utilisar fromtext-main en el seu lloc.
- fromcontentformat
- En desús.
Specify fromslots=main and use fromcontentformat-main instead.
- U dels següents valors: application/json, text/css, text/javascript, text/plain, text/x-wiki
- fromcontentmodel
- En desús.
Specify fromslots=main and use fromcontentmodel-main instead.
- U dels següents valors: GadgetDefinition, Scribunto, css, javascript, json, sanitized-css, text, wikitext
- fromsection
- En desús.
Solamente usar la sección especificada del contenido 'from' especificado.
- totitle
Segon títul per a comparar.
- toid
Segon identificador de pàgina per a comparar.
- Tipo: entero
- torev
Segona revisió per a comparar.
- Tipo: entero
- torelative
Use a revision relative to the revision determined from fromtitle, fromid or fromrev. All of the other 'to' options will be ignored.
- U dels següents valors: cur, next, prev
- 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.
- Valors (separats per | u atre separador): main
- totext-{slot}
Text of the specified slot. If omitted, the slot is removed from the revision.
- This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of 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.
- This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of toslots.
- tocontentformat-{slot}
Content serialization format of totext-{slot}.
- This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of toslots.
- U dels següents valors: application/json, text/css, text/javascript, text/plain, text/x-wiki
- tocontentmodel-{slot}
Content model of totext-{slot}. If not supplied, it will be guessed based on the other parameters.
- This is a templated parameter. When making the request, {slot} in the parameter's name should be replaced with values of toslots.
- U dels següents valors: GadgetDefinition, Scribunto, css, javascript, json, sanitized-css, text, wikitext
- topst
Do a pre-save transform on totext.
- Tipo: boolean (detalls)
- totext
- En desús.
Specify toslots=main and use totext-main instead.
- tocontentformat
- En desús.
Specify toslots=main and use tocontentformat-main instead.
- U dels següents valors: application/json, text/css, text/javascript, text/plain, text/x-wiki
- tocontentmodel
- En desús.
Specify toslots=main and use tocontentmodel-main instead.
- U dels següents valors: GadgetDefinition, Scribunto, css, javascript, json, sanitized-css, text, wikitext
- tosection
- En desús.
Solament usar la secció especificada del contingut 'to' especificat.
- prop
Quins fragments d'informació s'obtindran.
- diff
- El HTML de les diferències.
- diffsize
- El tamany del HTML de les diferències, en 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. If the user has been revision deleted, a fromuserhidden or touserhidden property will be returned.
- comment
- The comment on the 'from' and 'to' revisions. If the comment has been revision deleted, a fromcommenthidden or tocommenthidden property will be returned.
- parsedcomment
- The parsed comment on the 'from' and 'to' revisions. If the comment has been revision deleted, a fromcommenthidden or tocommenthidden property will be returned.
- size
- The size of the 'from' and 'to' revisions.
- timestamp
- (sense descripció)
- Valors (separats per | u atre separador): comment, diff, diffsize, ids, parsedcomment, rel, size, timestamp, title, user
- Predeterminat: diff|ids|title
- slots
Return individual diffs for these slots, rather than one combined diff for all slots.
- Valors (separats per | u atre separador): main
- Per a especificar tots els valors, utilisa *.
- Crear una diferència entre les revisions 1 i 2.
- api.php?action=compare&fromrev=1&torev=2 [obrir en la zona de proves]