lookupFollowedLists abstract method

Future<TwitterResponse<List<ListData>, ListMeta>> lookupFollowedLists({
  1. required String userId,
  2. int? maxResults,
  3. String? paginationToken,
  4. List<ListExpansion>? expansions,
  5. List<UserField>? userFields,
  6. List<ListField>? listFields,
  7. Paging<List<ListData>, ListMeta>? paging,
})

Returns all Lists a specified user follows.

The value returned when the paging callback is specified is the first object obtained that started the paging process. The value obtained in the paging process is passed to the paging callback function as a PagingEvent object.

Parameters

  • userId: The user ID whose followed Lists you would like to retrieve.

  • maxResults: The maximum number of results to be returned per page. This can be a number between 1 and 100. By default, each page will return 100 results.

  • paginationToken: Used to request the next page of results if all results weren't returned with the latest request, or to go back to the previous page of results. To return the next page, pass the next_token returned in your previous response. To go back one page, pass the previous_token returned in your previous response.

  • expansions: Expansions enable you to request additional data objects that relate to the originally returned List. The ID that represents the expanded data object will be included directly in the List data object, but the expanded object metadata will be returned within the includes response object, and will also include the ID so that you can match this data object to the original user object.

  • userFields: This fields parameter enables you to select which specific user fields will deliver with the users object. The user fields will only be returned if you have included expansions=owner_id query parameter in your request. You will find this ID and all additional user fields in the included data object.

  • listFields: This fields parameter enables you to select which specific List fields will deliver with each returned List objects. Specify the desired fields in a comma-separated list without spaces between commas and fields. These specified List fields will display directly in the List data objects.

  • paging: If this callback function is specified, paging is performed continuously until certain conditions are met. This paging function is bi-directional, both forward and backward, and allows for safe paging. The response and other metadata obtained when paging is performed is passed to the callback function as PagingEvent object. So you can get the result of paging from PagingEvent object. Also, the direction and continuity of paging can be controlled by returning PaginationControl object in the paging callback function. Please use PaginationControl.forward() to continue paging and move forward, or use PaginationControl.backward() to move backward. And be sure to return PaginationControl.stop() to terminate paging on arbitrary conditions, otherwise paging continues until the next page runs out.

Endpoint Url

Authentication Methods

  • OAuth 2.0 Authorization Code with PKCE
  • OAuth 2.0 App-only
  • OAuth 1.0a

Required Scopes

  • tweet.read
  • users.read
  • list.read

Rate Limits

  • App rate limit (OAuth 2.0 App Access Token): 15 requests per 15-minute window shared among all users of your app

  • User rate limit (OAuth 2.0 user Access Token): 15 requests per 15-minute window per each authenticated user

Reference

Implementation

Future<TwitterResponse<List<ListData>, ListMeta>> lookupFollowedLists({
  required String userId,
  int? maxResults,
  String? paginationToken,
  List<ListExpansion>? expansions,
  List<UserField>? userFields,
  List<ListField>? listFields,
  Paging<List<ListData>, ListMeta>? paging,
});