create method
Future<TwitterList>
create({
- String? name,
- String? mode,
- String? description,
- TransformResponse<
TwitterList> transform = defaultTwitterListTransform,
Creates a new list for the authenticated user. Note that you can create up to 1000 lists per account.
name The name for the list. A list's name must start with a letter
and can consist only of 25 or fewer letters, numbers, "-", or "_"
characters.
mode Whether your list is public or private. Values can be public or
private . If no mode is specified the list will be public.
description The description to give the list.
transform Can be used to parse the request. By default, the response is
parsed in an isolate.
Implementation
Future<TwitterList> create({
String? name,
String? mode,
String? description,
TransformResponse<TwitterList> transform = defaultTwitterListTransform,
}) async {
final body = <String, String>{}
..addParameter('name', name)
..addParameter('mode', mode)
..addParameter('description', description);
return client
.post(Uri.https('api.twitter.com', '1.1/lists/create.json'), body: body)
.then(transform);
}