Re: [Mediawiki-api] Limit The Results Number of Each Page In The API Response

2018-03-23 Thread Brad Jorsch (Anomie)
On Fri, Mar 23, 2018 at 6:18 AM, Tal Barda <412tal...@gmail.com> wrote:

> My problem is with the "lhlimit" parameter. I'd like to get 10 results for
> each page, but it's currently gives my 10 results for ALL of the pages,
> which means I have to call "lhcontinue" each time.
>
> Is it possible to get 10 results for each page when asking for multiple
> pages?
>

No. You can get more results total by increasing lhlimit, but trying to
limit results per page gets complicated in the API module's code, and would
be even more complicated to provide continuation.


>  Or should I make a different call for each article in order to achieve
> this?
>

That would be one way to do it.

-- 
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


[Mediawiki-api] Limit The Results Number of Each Page In The API Response

2018-03-23 Thread Tal Barda
Hi!
I know that I'm able to get the "linkshere" prop for multiple pages like
this:

https://en.wikipedia.org/w/api.php?format=json=query=linkshere=9379691|5442968=10=0=!redirect

My problem is with the "lhlimit" parameter. I'd like to get 10 results for
each page, but it's currently gives my 10 results for ALL of the pages,
which means I have to call "lhcontinue" each time.

Is it possible to get 10 results for each page when asking for multiple
pages?
Or should I make a different call for each article in order to achieve
this?

Thanks,
Tal
___
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api