MW 1.23 introduced a new API modules, list=allredirects and prop=redirects [1],
which were later rewritten for 1.24. While prop=redirects works perfectly for
me, I have some problems understanding how the list=allredirects (and
generator=allredirects) module is supposed to work.
First, the garprop parameter seems to be ignored for generator queries, whereas
arprop for list is respected -- for example [2] contains fragment information
for some redirects, but [3] contains none.
Also, the list=allredirects query seems to report an ID of the source page and
title of the target page, but the generator reports source page ID and source
title. When garunique is specified, it reports target page ID and target page
title, and garprop cannot be specified. This is not enough to resolve the
redirects (i.e. identify both source and target pages).
Finally, I have no idea what the "missing" key in the results (e.g. [4])
indicates...
[1]
https://www.mediawiki.org/wiki/API:Allredirects
[2]
https://www.mediawiki.org/w/api.php?action=query&list=allredirects&…
[3]
https://www.mediawiki.org/w/api.php?action=query&generator=allredirects…
[4]
https://wiki.archlinux.org/api.php?action=query&generator=allredirects&…
Thank you for your advice,
Jakub Klinkovský