Class: XTwitterScraper::Models::X::TweetDetail
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- XTwitterScraper::Models::X::TweetDetail
- Defined in:
- lib/x_twitter_scraper/models/x/tweet_detail.rb,
sig/x_twitter_scraper/models/x/tweet_detail.rbs
Defined Under Namespace
Classes: Article, Card, CommunityNote, Edit, NoteTweet, Place, PreviousCounts
Constant Summary collapse
- XTwitterScraper =
Instance Attribute Summary collapse
-
#article ⇒ XTwitterScraper::Models::X::TweetDetail::Article?
Article metadata attached to a tweet.
-
#author ⇒ XTwitterScraper::Models::X::TweetAuthor?
Tweet author profile.
- #bookmark_count ⇒ Integer
-
#card ⇒ XTwitterScraper::Models::X::TweetDetail::Card?
Public card metadata attached to a tweet.
-
#community_note ⇒ XTwitterScraper::Models::X::TweetDetail::CommunityNote?
Community Note presentation metadata returned by X.
-
#content_disclosure ⇒ XTwitterScraper::Models::ContentDisclosure?
Content disclosure metadata shown by X when a tweet is labeled as paid partnership content or AI-generated media.
-
#conversation_id ⇒ String?
ID of the root tweet in the conversation thread.
- #created_at ⇒ String?
-
#display_text_range ⇒ Array<Integer>?
Start and end offsets for rendered tweet text.
-
#edit ⇒ XTwitterScraper::Models::X::TweetDetail::Edit?
Edit history metadata returned by X.
-
#entities ⇒ Hash{Symbol=>Object}?
Parsed entities from the tweet text (URLs, mentions, hashtags, media).
- #id ⇒ String
-
#in_reply_to_id ⇒ String?
Tweet ID being replied to.
-
#in_reply_to_user_id ⇒ String?
User ID being replied to.
-
#in_reply_to_username ⇒ String?
Username being replied to.
-
#is_limited_reply ⇒ Boolean?
Whether replies are limited for this tweet.
-
#is_note_tweet ⇒ Boolean?
Whether this is a Note Tweet (long-form post, up to 25,000 characters).
-
#is_quote_status ⇒ Boolean?
Whether this tweet quotes another tweet.
-
#is_reply ⇒ Boolean?
Whether this tweet is a reply to another tweet.
- #is_translatable ⇒ Boolean?
-
#lang ⇒ String?
Tweet language code.
- #like_count ⇒ Integer
-
#media ⇒ Array<XTwitterScraper::Models::TweetMedia>?
Attached media items, omitted when the tweet has no media.
-
#note_tweet ⇒ XTwitterScraper::Models::X::TweetDetail::NoteTweet?
Complete Note Tweet content and rich-text metadata.
-
#place ⇒ XTwitterScraper::Models::X::TweetDetail::Place?
Public place metadata attached to a tweet.
- #possibly_sensitive ⇒ Boolean?
-
#previous_counts ⇒ XTwitterScraper::Models::X::TweetDetail::PreviousCounts?
Engagement counts retained from a prior tweet edit.
- #quote_count ⇒ Integer
-
#quoted_tweet ⇒ XTwitterScraper::Models::EmbeddedTweet?
Quoted or retweeted tweet context.
- #reply_count ⇒ Integer
- #retweet_count ⇒ Integer
-
#retweeted_tweet ⇒ XTwitterScraper::Models::EmbeddedTweet?
Quoted or retweeted tweet context.
-
#source ⇒ String?
Client application used to post this tweet.
- #text ⇒ String
-
#type ⇒ String?
Tweet result type.
-
#url ⇒ String?
Tweet permalink URL.
- #view_count ⇒ Integer
- #view_state ⇒ String?
Instance Method Summary collapse
-
#initialize(id: nil, bounding_box: nil, country: nil, country_code: nil, full_name: nil, name: nil, place_type: nil, url: nil) ⇒ Object
constructor
Public place metadata attached to a tweet.
- #to_hash ⇒ ::Hash[Symbol, top]
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id: nil, bounding_box: nil, country: nil, country_code: nil, full_name: nil, name: nil, place_type: nil, url: nil) ⇒ Object
Public place metadata attached to a tweet.
|
|
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 241
|
Instance Attribute Details
#article ⇒ XTwitterScraper::Models::X::TweetDetail::Article?
Article metadata attached to a tweet.
55 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 55 optional :article, -> { XTwitterScraper::X::TweetDetail::Article } |
#author ⇒ XTwitterScraper::Models::X::TweetAuthor?
Tweet author profile. The lookup route always includes follower count and verification state. Other profile fields appear when available.
62 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 62 optional :author, -> { XTwitterScraper::X::TweetAuthor } |
#bookmark_count ⇒ Integer
19 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 19 required :bookmark_count, Integer, api_name: :bookmarkCount |
#card ⇒ XTwitterScraper::Models::X::TweetDetail::Card?
Public card metadata attached to a tweet.
68 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 68 optional :card, -> { XTwitterScraper::X::TweetDetail::Card } |
#community_note ⇒ XTwitterScraper::Models::X::TweetDetail::CommunityNote?
Community Note presentation metadata returned by X.
74 75 76 77 78 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 74 optional :community_note, -> { XTwitterScraper::X::TweetDetail::CommunityNote }, api_name: :communityNote |
#content_disclosure ⇒ XTwitterScraper::Models::ContentDisclosure?
Content disclosure metadata shown by X when a tweet is labeled as paid partnership content or AI-generated media.
85 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 85 optional :content_disclosure, -> { XTwitterScraper::ContentDisclosure }, api_name: :contentDisclosure |
#conversation_id ⇒ String?
ID of the root tweet in the conversation thread
91 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 91 optional :conversation_id, String, api_name: :conversationId |
#created_at ⇒ String?
96 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 96 optional :created_at, String, api_name: :createdAt |
#display_text_range ⇒ Array<Integer>?
Start and end offsets for rendered tweet text
102 103 104 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 102 optional :display_text_range, XTwitterScraper::Internal::Type::ArrayOf[Integer], api_name: :displayTextRange |
#edit ⇒ XTwitterScraper::Models::X::TweetDetail::Edit?
Edit history metadata returned by X.
110 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 110 optional :edit, -> { XTwitterScraper::X::TweetDetail::Edit } |
#entities ⇒ Hash{Symbol=>Object}?
Parsed entities from the tweet text (URLs, mentions, hashtags, media)
116 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 116 optional :entities, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] |
#id ⇒ String
14 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 14 required :id, String |
#in_reply_to_id ⇒ String?
Tweet ID being replied to
122 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 122 optional :in_reply_to_id, String, api_name: :inReplyToId |
#in_reply_to_user_id ⇒ String?
User ID being replied to
128 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 128 optional :in_reply_to_user_id, String, api_name: :inReplyToUserId |
#in_reply_to_username ⇒ String?
Username being replied to
134 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 134 optional :in_reply_to_username, String, api_name: :inReplyToUsername |
#is_limited_reply ⇒ Boolean?
Whether replies are limited for this tweet
140 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 140 optional :is_limited_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isLimitedReply |
#is_note_tweet ⇒ Boolean?
Whether this is a Note Tweet (long-form post, up to 25,000 characters)
146 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 146 optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet |
#is_quote_status ⇒ Boolean?
Whether this tweet quotes another tweet
152 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 152 optional :is_quote_status, XTwitterScraper::Internal::Type::Boolean, api_name: :isQuoteStatus |
#is_reply ⇒ Boolean?
Whether this tweet is a reply to another tweet
158 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 158 optional :is_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isReply |
#is_translatable ⇒ Boolean?
163 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 163 optional :is_translatable, XTwitterScraper::Internal::Type::Boolean, api_name: :isTranslatable |
#lang ⇒ String?
Tweet language code
169 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 169 optional :lang, String |
#like_count ⇒ Integer
24 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 24 required :like_count, Integer, api_name: :likeCount |
#media ⇒ Array<XTwitterScraper::Models::TweetMedia>?
Attached media items, omitted when the tweet has no media
175 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 175 optional :media, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia] } |
#note_tweet ⇒ XTwitterScraper::Models::X::TweetDetail::NoteTweet?
Complete Note Tweet content and rich-text metadata.
181 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 181 optional :note_tweet, -> { XTwitterScraper::X::TweetDetail::NoteTweet }, api_name: :noteTweet |
#place ⇒ XTwitterScraper::Models::X::TweetDetail::Place?
Public place metadata attached to a tweet.
187 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 187 optional :place, -> { XTwitterScraper::X::TweetDetail::Place } |
#possibly_sensitive ⇒ Boolean?
192 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 192 optional :possibly_sensitive, XTwitterScraper::Internal::Type::Boolean, api_name: :possiblySensitive |
#previous_counts ⇒ XTwitterScraper::Models::X::TweetDetail::PreviousCounts?
Engagement counts retained from a prior tweet edit.
198 199 200 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 198 optional :previous_counts, -> { XTwitterScraper::X::TweetDetail::PreviousCounts }, api_name: :previousCounts |
#quote_count ⇒ Integer
29 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 29 required :quote_count, Integer, api_name: :quoteCount |
#quoted_tweet ⇒ XTwitterScraper::Models::EmbeddedTweet?
Quoted or retweeted tweet context. Every object includes id, text, and engagement metrics. A zero metric can mean X did not report the count. Author, media, and conversation fields appear when available.
208 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 208 optional :quoted_tweet, -> { XTwitterScraper::EmbeddedTweet } |
#reply_count ⇒ Integer
34 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 34 required :reply_count, Integer, api_name: :replyCount |
#retweet_count ⇒ Integer
39 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 39 required :retweet_count, Integer, api_name: :retweetCount |
#retweeted_tweet ⇒ XTwitterScraper::Models::EmbeddedTweet?
Quoted or retweeted tweet context. Every object includes id, text, and engagement metrics. A zero metric can mean X did not report the count. Author, media, and conversation fields appear when available.
216 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 216 optional :retweeted_tweet, -> { XTwitterScraper::EmbeddedTweet } |
#source ⇒ String?
Client application used to post this tweet
222 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 222 optional :source, String |
#text ⇒ String
44 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 44 required :text, String |
#type ⇒ String?
Tweet result type
228 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 228 optional :type, String |
#url ⇒ String?
Tweet permalink URL
234 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 234 optional :url, String |
#view_count ⇒ Integer
49 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 49 required :view_count, Integer, api_name: :viewCount |
#view_state ⇒ String?
239 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 239 optional :view_state, String, api_name: :viewState |
Instance Method Details
#to_hash ⇒ ::Hash[Symbol, top]
212 |
# File 'sig/x_twitter_scraper/models/x/tweet_detail.rbs', line 212
def to_hash: -> ::Hash[Symbol, top]
|