retweetsOfMe method

Future<List<Tweet>> retweetsOfMe({
  1. int? count,
  2. String? sinceId,
  3. String? maxId,
  4. bool? trimUser,
  5. bool? includeEntities,
  6. bool? includeUserEntities,
  7. bool? includeExtEditControl,
  8. String tweetMode = 'extended',
  9. TransformResponse<List<Tweet>> transform = defaultTweetListTransform,
})

Returns the most recent Tweets authored by the authenticating user that have been retweeted by others. This timeline is a subset of the user's GET statuses / user_timeline.

count: Specifies the number of records to retrieve. Must be less than or equal to 100.

sinceId: Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occurred since the sinceId, the sinceId will be forced to the oldest ID available.

maxId: Returns results with an ID less than (that is, older than) or equal to the specified ID.

trimUser: When true, each tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.

includeEntities: The entities node will not be included when set to false.

includeUserEntities: The user entities node will not be included when set to false.

tweetMode: When set to extended, uses the extended Tweets. See https://developer.twitter.com/en/docs/tweets/data-dictionary/overview/intro-to-tweet-json#extendedtweet.

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

See https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/get-statuses-retweets_of_me.

Implementation

Future<List<Tweet>> retweetsOfMe({
  int? count,
  String? sinceId,
  String? maxId,
  bool? trimUser,
  bool? includeEntities,
  bool? includeUserEntities,
  bool? includeExtEditControl,
  String tweetMode = 'extended',
  TransformResponse<List<Tweet>> transform = defaultTweetListTransform,
}) async {
  final params = <String, String>{}
    ..addParameter('count', count)
    ..addParameter('since_id', sinceId)
    ..addParameter('max_id', maxId)
    ..addParameter('trim_user', trimUser)
    ..addParameter('include_entities', includeEntities)
    ..addParameter('include_user_entities', includeUserEntities)
    ..addParameter('include_ext_edit_control', includeExtEditControl)
    ..addParameter('tweet_mode', tweetMode);

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