eldur / jwbf

Java Wiki Bot Framework is a library to maintain Wikis like Wikipedia based on MediaWiki.
http://jwbf.sourceforge.net/
Apache License 2.0
78 stars 33 forks source link

Make LIMIT configurable #42

Open Hunsu opened 9 years ago

Hunsu commented 9 years ago

When we do a request to MediaWiki api, the library ask for 50 results. It's not configurable. MediaWiki api return up to 500 results for normal users and up to 5000 for bots.

The library will make 100 request to get all articles that are in category that contains 5000 articles. Although it's possible to get them all with just one request. MediaWiki api doc also recommend this.

One solution is to add getter and setter to be able to change it.

eldur commented 9 years ago

Some queries has a constructor parameter to change this behavior. I'll follow this approach in the following classes, to complete this issue:

What do you think?

Hunsu commented 9 years ago

Yes it will be good. Can you handler the case where the user want to get max result. If he pass 0 then it means he want max results or something like that.

Thanks.