-
Notifications
You must be signed in to change notification settings - Fork 221
Twitter Lists : Members
linvi edited this page May 19, 2015
·
10 revisions
Twitter Lists are composed of members. These members are users whose public tweets will be available from the List
.
// From a List object
var members = list.GetMembers(<maximumNumberOfMembersToRetrieve>);
// From the Static TwitterList
var members = TwitterList.GetMembersOfList(<list_identifier>, <maximumNumberOfMembersToRetrieve>);
// You can add users to a list by specifying their id, screen name or by giving an `User` object.
var success = list.AddMember(<user_identifier>);
// Here is the static way to add a member to a list
var success = TwitterList.AddMemberToList(<list_identifier>, <user_identifier>);
When adding multiple members the return is of type MultiRequestsResult.
var multiRequestResult = TweetList.AddMultipleMembersToList(<list_identifier>, Enumerable<user_identifiers>);
// You can remove users from a list by specifying their id, screen name or by giving an `User` object.
var success = list.RemoveMember(<user_identifier>);
// Here is the static way to remove a member from a list
var success = TwitterList.RemoveMemberToList(<list_identifier>, <user_identifier>);
When removing multiple members the return is of type MultiRequestsResult.
var multiRequestResult = TwitterList.RemoveMultipleMembersFromList(<list_identifier>, Enumerable<user_identifiers>);