show method
Returns a single Tweet, specified by the id
parameter. The Tweet's
author will also be embedded within the Tweet.
See lookup for getting Tweets in bulk (up to 100 per call).
id
: The numerical ID of the desired Tweet.
trimUser
: When true
, each Tweet will include a user object including
only the status authors numerical ID. Omit this parameter to receive the
complete user object.
includeMyRetweet
: When true
, any Tweets returned that have been
retweeted by the authenticating user will include an additional node,
containing the ID of the source status for the retweet.
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
includeExtAltText
: If alt text has been added to any attached media
entities, this parameter will return an ext_alt_text value in the
top-level key for the media entity. If no value has been set, this will be
returned as null
.
TODO: implement
includeCardUri
: When true
, the retrieved Tweet will include a card_uri
attribute when there is an ads card attached to the Tweet and when that
card was attached using the card_uri value.
TODO: implement
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-show-id.
Implementation
Future<Tweet> show({
required String id,
bool? trimUser,
bool? includeMyRetweet,
bool? includeEntities,
@notImplemented bool? includeExtAltText,
@notImplemented bool? includeCardUri,
String tweetMode = 'extended',
bool? includeExtEditControl,
TransformResponse<Tweet> transform = defaultTweetTransform,
}) {
final params = <String, String>{}
..addParameter('tweet_mode', tweetMode)
..addParameter('id', id)
..addParameter('trim_user', trimUser)
..addParameter('include_my_retweet', includeMyRetweet)
..addParameter('include_entities', includeEntities)
..addParameter('include_ext_alt_text', includeExtAltText)
..addParameter('include_ext_edit_control', includeExtEditControl)
..addParameter('include_card_uri', includeCardUri);
return client
.get(Uri.https('api.twitter.com', '1.1/statuses/show.json', params))
.then(transform);
}