membersDestroy method
Removes the specified member from the list. The authenticated user must be the list's owner to remove members from the list.
ownerScreenName
The screen name of the user who owns the list being
requested by a slug
.
ownerId
The user ID of the user who owns the list being requested by
a slug
.
listId
The numerical id of the list.
slug
You can identify a list by its slug instead of its numerical id.
If you decide to do so, note that you'll also have to specify the list
owner using the ownerId
or ownerScreenName
parameters.
userId
The ID of the user to remove from the list.
screenName
The screen name of the user for whom to remove from the list.
Implementation
Future<void> membersDestroy({
String? ownerScreenName,
String? ownerId,
String? listId,
String? slug,
String? userId,
String? screenName,
}) async {
final body = <String, String>{}
..addParameter('owner_screen_name', ownerScreenName)
..addParameter('owner_id', ownerId)
..addParameter('list_id', listId)
..addParameter('slug', slug)
..addParameter('user_id', userId)
..addParameter('screen_name', screenName);
await client.post(
Uri.https('api.twitter.com', '1.1/lists/members/destroy.json'),
body: body,
);
}