intercom / intercom-dotnet

Intercom API client library for .NET
https://developers.intercom.io/reference
Apache License 2.0
63 stars 53 forks source link

Paging through a list of users #159

Open lamelyan opened 4 years ago

lamelyan commented 4 years ago

I get a list of users by segment id.

 var parameters = new Dictionary<string, string>();
 parameters.Add("segment_id", segmentId);
 var result= usersClient.List(parameters);

The result is paged by 50 users per page. How do I retrieve the next page in the results?

I see that there is a method called Next that is not yet implemented.

Is there another way to get all users in a segment? Do I need to use scrolling? Do I pass in an additional parameter and call the List method again?

johnnyoshika commented 4 years ago

Try this:

usersClient.List(new Dictionary<string, string> { { "page", "2" } });