show method

Future<TwitterList> show({
  1. String? listId,
  2. String? slug,
  3. String? ownerScreenName,
  4. String? ownerId,
  5. TransformResponse<TwitterList> transform = defaultTwitterListTransform,
})

Returns the specified list. Private lists will only be shown if the authenticated user owns the specified list.

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.

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.

transform Can be used to parse the request. By default, the response is parsed in an isolate.

See https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-show.

Implementation

Future<TwitterList> show({
  String? listId,
  String? slug,
  String? ownerScreenName,
  String? ownerId,
  TransformResponse<TwitterList> transform = defaultTwitterListTransform,
}) async {
  final params = <String, String>{}
    ..addParameter('list_id', listId)
    ..addParameter('slug', slug)
    ..addParameter('owner_screen_name', ownerScreenName)
    ..addParameter('owner_id', ownerId);

  return client
      .get(Uri.https('api.twitter.com', '1.1/lists/show.json', params))
      .then(transform);
}