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
Constant Summary collapse
- XTwitterScraper =
Instance Attribute Summary collapse
-
#author ⇒ XTwitterScraper::Models::X::TweetAuthor?
Tweet author profile.
- #bookmark_count ⇒ Integer
-
#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.
-
#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.
-
#lang ⇒ String?
Tweet language code.
- #like_count ⇒ Integer
-
#media ⇒ Array<XTwitterScraper::Models::TweetMedia>?
Attached media items, omitted when the tweet has no media.
- #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
Instance Method Summary collapse
-
#initialize(id:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, author: nil, content_disclosure: nil, conversation_id: nil, created_at: nil, display_text_range: nil, entities: nil, in_reply_to_id: nil, in_reply_to_user_id: nil, in_reply_to_username: nil, is_limited_reply: nil, is_note_tweet: nil, is_quote_status: nil, is_reply: nil, lang: nil, media: nil, quoted_tweet: nil, retweeted_tweet: nil, source: nil, type: nil, url: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see TweetDetail for more details.
- #to_hash ⇒ {
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:, bookmark_count:, like_count:, quote_count:, reply_count:, retweet_count:, text:, view_count:, author: nil, content_disclosure: nil, conversation_id: nil, created_at: nil, display_text_range: nil, entities: nil, in_reply_to_id: nil, in_reply_to_user_id: nil, in_reply_to_username: nil, is_limited_reply: nil, is_note_tweet: nil, is_quote_status: nil, is_reply: nil, lang: nil, media: nil, quoted_tweet: nil, retweeted_tweet: nil, source: nil, type: nil, url: nil) ⇒ Object
Some parameter documentations has been truncated, see XTwitterScraper::Models::X::TweetDetail for more details.
Full tweet with text, engagement metrics, media, and metadata. A zero metric can mean X did not report the count.
|
|
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 178
|
Instance Attribute Details
#author ⇒ XTwitterScraper::Models::X::TweetAuthor?
Tweet author profile. The lookup route always includes follower count and verification state. Other profile fields appear when available.
56 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 56 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 |
#content_disclosure ⇒ XTwitterScraper::Models::ContentDisclosure?
Content disclosure metadata shown by X when a tweet is labeled as paid partnership content or AI-generated media.
63 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 63 optional :content_disclosure, -> { XTwitterScraper::ContentDisclosure }, api_name: :contentDisclosure |
#conversation_id ⇒ String?
ID of the root tweet in the conversation thread
69 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 69 optional :conversation_id, String, api_name: :conversationId |
#created_at ⇒ String?
74 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 74 optional :created_at, String, api_name: :createdAt |
#display_text_range ⇒ Array<Integer>?
Start and end offsets for rendered tweet text
80 81 82 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 80 optional :display_text_range, XTwitterScraper::Internal::Type::ArrayOf[Integer], api_name: :displayTextRange |
#entities ⇒ Hash{Symbol=>Object}?
Parsed entities from the tweet text (URLs, mentions, hashtags, media)
88 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 88 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
94 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 94 optional :in_reply_to_id, String, api_name: :inReplyToId |
#in_reply_to_user_id ⇒ String?
User ID being replied to
100 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 100 optional :in_reply_to_user_id, String, api_name: :inReplyToUserId |
#in_reply_to_username ⇒ String?
Username being replied to
106 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 106 optional :in_reply_to_username, String, api_name: :inReplyToUsername |
#is_limited_reply ⇒ Boolean?
Whether replies are limited for this tweet
112 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 112 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)
118 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 118 optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet |
#is_quote_status ⇒ Boolean?
Whether this tweet quotes another tweet
124 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 124 optional :is_quote_status, XTwitterScraper::Internal::Type::Boolean, api_name: :isQuoteStatus |
#is_reply ⇒ Boolean?
Whether this tweet is a reply to another tweet
130 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 130 optional :is_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isReply |
#lang ⇒ String?
Tweet language code
136 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 136 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
142 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 142 optional :media, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia] } |
#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.
150 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 150 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.
158 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 158 optional :retweeted_tweet, -> { XTwitterScraper::EmbeddedTweet } |
#source ⇒ String?
Client application used to post this tweet
164 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 164 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
170 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 170 optional :type, String |
#url ⇒ String?
Tweet permalink URL
176 |
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 176 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 |
Instance Method Details
#to_hash ⇒ {
178 |
# File 'sig/x_twitter_scraper/models/x/tweet_detail.rbs', line 178
def to_hash: -> {
|