Multiple revisions from a generator with prop=revisions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple revisions from a generator with prop=revisions

Tony Sidaway
I'm trying to use a single API call to generate information on
multiple revisions of pages that transclude another page.

The parameters I use are as follows:

action=query
prop=revisions
generator=embeddedin
geinamespace=2
geititle=user:Iron_Chicken/ToDo
rvprop=user|ids|comment

The url looks like this:

http://en.wikipedia.org/w/api.php?action=query&prop=revisions&generator=embeddedin&rvprop=user|ids|comment&geinamespace=2&geititle=user:Iron_Chicken/ToDo

That's great but it only returns information about the latest revision.

So I look at the documentation for prop=revisions and add rvlimit=5

http://en.wikipedia.org/w/api.php?action=query&prop=revisions&generator=embeddedin&rvprop=user|ids|comment&geinamespace=2&geititle=user:Iron_Chicken/ToDo&rvlimit=5

Oops, now I get the dreaded API documentation message.

Wassup?

_______________________________________________
Mediawiki-api mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Reply | Threaded
Open this post in threaded view
|

Re: Multiple revisions from a generator with prop=revisions

Yuri Astrakhan
Ohh great. I spent countless hours making that self-documentation
message, and it is now dreaded? :)

This is a known limitation that I don't see a way around. SQL, to the
best of my knowledge, does not allow "for each page in list, get first
N rows from a subquery", or something like that. In order words, a sql
request would have to be made separately for each page - not good.

--Yuri

On 7/29/07, Tony Sidaway <[hidden email]> wrote:

> I'm trying to use a single API call to generate information on
> multiple revisions of pages that transclude another page.
>
> The parameters I use are as follows:
>
> action=query
> prop=revisions
> generator=embeddedin
> geinamespace=2
> geititle=user:Iron_Chicken/ToDo
> rvprop=user|ids|comment
>
> The url looks like this:
>
> http://en.wikipedia.org/w/api.php?action=query&prop=revisions&generator=embeddedin&rvprop=user|ids|comment&geinamespace=2&geititle=user:Iron_Chicken/ToDo
>
> That's great but it only returns information about the latest revision.
>
> So I look at the documentation for prop=revisions and add rvlimit=5
>
> http://en.wikipedia.org/w/api.php?action=query&prop=revisions&generator=embeddedin&rvprop=user|ids|comment&geinamespace=2&geititle=user:Iron_Chicken/ToDo&rvlimit=5
>
> Oops, now I get the dreaded API documentation message.
>
> Wassup?
>
> _______________________________________________
> Mediawiki-api mailing list
> [hidden email]
> http://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>

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