bear / python-twitter

A Python wrapper around the Twitter API.
Apache License 2.0
3.41k stars 955 forks source link

Add documented but missing count to GetLists() #646

Closed M4rtinK closed 2 years ago

M4rtinK commented 4 years ago

The GetLists() method documents the count parameter, which is actually not available in the method signature and can't be used.

Due to this, the GetLists() method is basically limited to retrieving ~300 lists at once, as the internally called GetListsPaged() method will retrieve only 20 lists at once and will hit rate limits after 15 calls in a row.

So add "count" to the method signature and pass it to GetListsPaged(). Also add a note about rate limits & hint to bump "count" once they start to be hit.

With this change a caller that passes say 500 as "count" (tested) can retrieve 300+ lists without unnecessarily hitting rate limits.


This change is Reviewable

M4rtinK commented 4 years ago

A couple notes:

Please let me know about your preferences & I can change the PR accordingly. :)