-
Notifications
You must be signed in to change notification settings - Fork 221
Twitter Lists : Members
Alastair Murdoch edited this page Apr 6, 2016
·
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 = TwitterList.AddMultipleMembersToList(<list_identifier>, Enumerable<user_identifiers>);
You can check if a user is a member of a list.
var isMember = list.CheckUserMembership(<user_identifier>);
var isMember = TwitterList.CheckIfUserIsAListMember(<list_identifier>, <user_identifier>);
// 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>);