lookup method
Returns fully-hydrated Tweet objects for up to 100 Tweets per request, as specified by comma-separated values passed to the id parameter.
id
: A comma separated list of Tweet IDs, up to 100 are allowed in a
single request.
includeEntities
: The entities node will not be included when set to
false.
trimUser
: when set to 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.
map
: when using the map parameter, Tweets that do not exist or cannot be
viewed by the current user will still have their key represented but with
an explicitly null value paired with it
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
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-lookup.
Implementation
Future<List<Tweet>> lookup({
required List<String> id,
bool? includeEntities,
bool? trimUser,
bool? map,
@notImplemented bool? includeExtAltText,
@notImplemented bool? includeCardUri,
bool? includeExtEditControl,
String tweetMode = 'extended',
TransformResponse<List<Tweet>> transform = defaultTweetListTransform,
}) async {
final params = <String, String>{}
..addParameter('id', id)
..addParameter('include_entities', includeEntities)
..addParameter('trim_user', trimUser)
..addParameter('map', map)
..addParameter('include_ext_alt_text', includeExtAltText)
..addParameter('include_card_uri', includeCardUri)
..addParameter('include_ext_edit_control', includeExtEditControl);
return client
.get(Uri.https('api.twitter.com', '1.1/statuses/lookup.json', params))
.then(transform);
}