subscriptions method
Future<PaginatedTwitterLists>
subscriptions({
- String? userId,
- String? screenName,
- String? count,
- String? cursor,
- TransformResponse<
PaginatedTwitterLists> transform = defaultPaginatedTwitterListsTransform,
Obtain a collection of the lists the specified user is subscribed to, 20 lists per page by default. Does not include the user's own lists.
userId
The ID of the user for whom to return results.
screenName
The screen name of the user for whom to return results.
count
Specifies the number of results to retrieve per "page."
cursor
Breaks the results into pages. A single page contains 20 lists
. Provide a value of -1
to begin paging.
transform
Can be used to parse the request. By default, the response is
parsed in an isolate.
Implementation
Future<PaginatedTwitterLists> subscriptions({
String? userId,
String? screenName,
String? count,
String? cursor,
TransformResponse<PaginatedTwitterLists> transform =
defaultPaginatedTwitterListsTransform,
}) async {
final params = <String, String>{}
..addParameter('user_id', userId)
..addParameter('screen_name', screenName)
..addParameter('count', count)
..addParameter('cursor', cursor);
return client
.get(
Uri.https('api.twitter.com', '1.1/lists/subscriptions.json', params),
)
.then(transform);
}