TweetData class
Tweets are the basic building block of all things Twitter. The Tweet object
has a long list of root-level
fields, such as id, text, and
createdAt.
Tweet objects are also the parent
object to several child objects
including user
, media
, poll
, and place
. Use the field parameter
tweet.fields when requesting these root-level fields on the Tweet object.
The Tweet object that can be found and expanded in the user resource.
Additional Tweets related to the requested Tweet can also be found and
expanded in the Tweet resource. The object is available for expansion with
UserExpansion.pinnedTweetId
in the user resource or
TweetExpansion.referencedTweetsId
in the Tweet resource to get the object
with only default fields. Use the expansion with the field parameter:
tweet.fields when requesting additional fields to complete the object.
- Annotations
-
- @freezed
Constructors
-
TweetData({required String id, required String text, String? authorId, String? inReplyToUserId, String? conversationId, List<
ReferencedTweet> ? referencedTweets, List<TweetContextAnnotationGroup> ? contextAnnotations, TweetEntities? entities, TweetAttachments? attachments, @JsonKey(name: 'non_public_metrics') PrivateTweetMetrics? privateMetrics, OrganicTweetMetrics? organicMetrics, PromotedTweetMetrics? promotedMetrics, PublicTweetMetrics? publicMetrics, Geo? geo, Language? lang, @JsonKey(name: 'possibly_sensitive') bool? isPossiblySensitive, @JsonKey(name: 'reply_settings') ReplySetting? replySetting, String? source, TweetEditControls? editControls, List<String> ? editHistoryTweetIds, TweetWithheld? withheld, DateTime? createdAt}) -
constfactory
-
TweetData.fromJson(Map<
String, Object?> json) -
factory
Properties
- attachments → TweetAttachments?
-
Specifies the type of attachments (if any) present in this Tweet.
no setterinherited
-
Unique identifier of this user. This is returned as a string in order
to avoid complications with languages and tools that cannot handle large
integers.
no setterinherited
-
contextAnnotations
→ List<
TweetContextAnnotationGroup> ? -
Contains context annotations for the Tweet.
no setterinherited
- conversationId → String?
-
The Tweet ID of the original Tweet of the conversation (which includes
direct replies, replies of replies).
no setterinherited
-
copyWith
→ $TweetDataCopyWith<
TweetData> -
no setterinherited
- createdAt → DateTime?
-
Creation time of the Tweet.
no setterinherited
- editControls → TweetEditControls?
-
Indicates if a Tweet is eligible for edit, how long it is editable for,
and the number of remaining edits.
no setterinherited
-
editHistoryTweetIds
→ List<
String> ? -
Unique identifiers indicating all versions of an edited Tweet.
no setterinherited
- entities → TweetEntities?
-
Contains details about text that has a special meaning in a Tweet.
no setterinherited
- geo → Geo?
-
Contains details about the location tagged by the user in this Tweet,
if they specified one.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier of this Tweet. This is returned as a string in order
to avoid complications with languages and tools that cannot handle
large integers.
no setterinherited
- inReplyToUserId → String?
-
If this Tweet is a Reply, indicates the user ID of the parent Tweet's
author. This is returned as a string in order to avoid complications
with languages and tools that cannot handle large integers.
no setterinherited
- isPossiblySensitive → bool?
-
Indicates if this Tweet contains URLs marked as sensitive, for example
content suitable for mature audiences.
no setterinherited
- lang → Language?
-
Language of the Tweet, if detected by Twitter. Returned as a BCP47
language.
no setterinherited
- organicMetrics → OrganicTweetMetrics?
-
Engagement metrics, tracked in an organic context, for the Tweet at
the time of the request.
no setterinherited
- privateMetrics → PrivateTweetMetrics?
-
Non-public engagement metrics for the Tweet at the time of the request.
no setterinherited
- promotedMetrics → PromotedTweetMetrics?
-
Engagement metrics, tracked in a promoted context, for the Tweet at the
time of the request.
no setterinherited
- publicMetrics → PublicTweetMetrics?
-
Engagement metrics for the Tweet at the time of the request.
no setterinherited
-
referencedTweets
→ List<
ReferencedTweet> ? -
A list of Tweets this Tweet refers to. For example, if the parent Tweet
is a Retweet, a Retweet with comment (also known as Quoted Tweet) or a
Reply, it will include the related Tweet referenced to by its parent.
no setterinherited
- replySetting → ReplySetting?
-
Shows who can reply to this Tweet. Fields returned are
ReplySetting.everyone, ReplySetting.mentionedUsers,
and ReplySetting.following.
To obtain this field, add
TweeField.replySetting
in the request's query parameter.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String?
-
The name of the app the user Tweeted from.
no setterinherited
- text → String
-
The actual UTF-8 text of the Tweet. See twitter-text for details on
what characters are currently considered valid.
no setterinherited
- withheld → TweetWithheld?
-
Contains withholding details for withheld content.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited