Count parameter not used

May 4, 2015 at 6:40 PM
Hi

I was using Tweetinvi to get the members of a list.

The code i'm using is something like this
var list = TweetList.GetExistingList("some_list", "some_user");
var members = list.GetMembers(5000);
The underlying twitter api url is https://api.twitter.com/1.1/lists/members.json wich have a count parameter that specifies the number of results to return per page with a maximum value of 5000, but Tweetinvi never uses this parameter.

For example, if you want to retrieve a list with 400 members you will call the Twitter api 20 times getting the limit of calls pretty soon when you can get all the members with a single api call.

I temporarily fixed this adding to Tweetinvi.Credentials\TwitterAccessor in line 282 change this:
 // add & for query parameters
baseQuery = FormatBaseQuery(baseQuery);

var result = new List<T>();
into this:
// add & for query parameters
baseQuery = FormatBaseQuery(baseQuery);

baseQuery = String.Format("{0}count=5000&", baseQuery);

var result = new List<T>();
Sorry my bad english
Coordinator
May 4, 2015 at 8:21 PM
Hi,

You are totally right. This is a current bug. Until now I implemented very basic features related with Lists.
You will be happy to hear that the upcoming version (0.9.8.0) will implement all the features related with Lists.

Concerning the current bug, I have just fixed in the latest Source Code.

https://tweetinvi.codeplex.com/SourceControl/changeset/43600

Please follow Tweetinvi because version 0.9.8.0 should give you various improvements.

Cheers,
Linvi
Marked as answer by linvi on 5/4/2015 at 12:21 PM
May 5, 2015 at 5:00 PM
Great, thanx for the fix.

I'll be following Tweetinvi progress closely.