[Mediawiki-api-announce] Changes to action=query&prop=revisions and similar modules due to Multi-Content Revisions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Mediawiki-api-announce] Changes to action=query&prop=revisions and similar modules due to Multi-Content Revisions

Gergo Tisza
The Multi-Content Revisions project [1] introduced the concept of slots to MediaWiki: instead of a single content, a revision can now contain multiple content slots, each identified by a role name. With Gerrit change 413223 [2], the revision-related query API modules (action=query&prop=revisions, action=query&prop=deletedrevisions, action=query&list=allrevisions, and action=query&list=alldeletedrevisions) are updated to account for that:
* They take a new '<prefix>slots' parameter (where <prefix> is one of 'rv', 'drv', 'arv', 'adr') to indicate which roles to return information about. Use '*' to return information about all slots, 'main' to return information about the main slot (which is what was called the content of the revision before multi-content revisions were introduced). When not used, it will default to 'main' and the legacy response format will be used.
* Their '<prefix>prop' parameter takes a new value, 'roles', to list roles for which a slot exists in the given revision. 
* Using '<prefix>prop=content' or '<prefix>prop=contentmodel' without specifiying '<prefix>slots' has been deprecated.
* The parameter '<prefix>contentformat' has been deprecated. Clients should be prepared to handle the default format.
* Using '<prefix>slots' together with the (already deprecated) parameters '<prefix>expandtemplates', '<prefix>generatexml', '<prefix>parse', '<prefix>diffto', '<prefix>difftotext', '<prefix>difftotextpst', '<prefix>contentformat' and '<prefix>prop=parsetree' results in an error.

Multi-Content Revisions is a work in progress; at this point in time, you are unlikely to find a wiki with pages which have roles other than 'main'. This will change in the next few months.




-- 
Gergő Tisza (Tgr)
Senior Software Engineer
Wikimedia Foundation

_______________________________________________
Mediawiki-api-announce mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce

_______________________________________________
Mediawiki-api mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api