mentionsTimeline method
Returns the 20 most recent mentions (Tweets containing a users' @screen_name) for the authenticating user.
This method can only return up to 800 tweets.
count
: Specifies the number of Tweets to try and retrieve, up to a
maximum of 200 per distinct request. The value of count is best thought of
as a limit to the number of Tweets to return because suspended or deleted
content is removed after the count has been applied. We include retweets
in the count, even if includeRts
is not supplied. It is recommended you
always set includeRts
to true
when using this API method.
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
.
includeExtEditControl
: The includeExtEditControl
node will not be included when set to
false
. See https://developer.twitter.com/en/docs/twitter-api/v1/edit-tweets
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/timelines/api-reference/get-statuses-mentions_timeline.
Implementation
Future<List<Tweet>> mentionsTimeline({
int? count,
String? sinceId,
String? maxId,
bool? trimUser,
bool? includeEntities,
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_ext_edit_control', includeExtEditControl)
..addParameter('tweet_mode', 'extended');
return client
.get(Uri.https(
'api.twitter.com',
'1.1/statuses/mentions_timeline.json',
params,
))
.then(transform);
}