Please note that the API follows unlimited number of redirects (taking care of the circular ones), although this is mostly irrelevant to this discussion. --Yuri

On Dec 14, 2007 10:37 AM, Paolo Liberatore < Paolo.Liberatore@dis.uniroma1.it> wrote:
On Fri, 14 Dec 2007, Jan Hecking wrote:

>
> Thanks for the reminder, Paolo! I hadn't considered index.php before
> because I assumed it only returns the rendered HTML markup. But now I
> saw that there is an action=raw parameter which returns the raw wiki
> markup that I'm looking for. However this API has one other drawback: In
> contrast to api.php it doesn't have an option to resolve redirects
> automatically. When calling api.php I was using the redirects parameter
> to do so but this doesn't seem to be supported by index.php when using
> action=raw (only for action=view). That means I would potentially have
> to make multiple calls to resolve redirects manually. Or is there a way
> to avoid this?
>
> Thanks,
> Jan
>

You never need to call it more than twice, because a redirect that points
to another redirect is in fact non-functional in the regular interface.
I don't think there is a way to make index.php automatically redirect
with action=raw; however, you can also use action=render (this is also
compatible with the 'redirect' argument, I'll fix the MW page).

Paolo

_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api