Class: XTwitterScraper::Models::SearchTweet
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- XTwitterScraper::Models::SearchTweet
- Defined in:
- lib/x_twitter_scraper/models/search_tweet.rb,
sig/x_twitter_scraper/models/search_tweet.rbs
Defined Under Namespace
Classes: Article, Card, CommunityNote, Edit, NoteTweet, Place, PreviousCounts
Constant Summary collapse
- XTwitterScraper =
Instance Attribute Summary collapse
-
#article ⇒ XTwitterScraper::Models::SearchTweet::Article?
Article metadata attached to a tweet.
-
#author ⇒ XTwitterScraper::Models::UserProfile?
X user profile with bio, follower counts, and verification status.
- #bookmark_count ⇒ Integer
-
#card ⇒ XTwitterScraper::Models::SearchTweet::Card?
Public card metadata attached to a tweet.
-
#community_note ⇒ XTwitterScraper::Models::SearchTweet::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?
Root tweet ID for the search result conversation.
- #created_at ⇒ String?
-
#display_text_range ⇒ Array<Integer>?
Rendered text's start and end offsets.
-
#edit ⇒ XTwitterScraper::Models::SearchTweet::Edit?
Edit history metadata returned by X.
-
#entities ⇒ Hash{Symbol=>Object}?
Parsed search-result entities including URLs, mentions, hashtags, and media markers.
- #id ⇒ String
-
#in_reply_to_id ⇒ String?
ID of the tweet this result replies to.
-
#in_reply_to_user_id ⇒ String?
ID of the user this result replies to.
-
#in_reply_to_username ⇒ String?
Username this result replies to.
-
#is_limited_reply ⇒ Boolean?
Whether the tweet has limited reply permissions.
-
#is_note_tweet ⇒ Boolean?
True for Note Tweets (long-form content, up to 25,000 characters).
-
#is_quote_status ⇒ Boolean?
True when this search result quotes another tweet.
-
#is_reply ⇒ Boolean?
True when this search result is a reply.
- #is_translatable ⇒ Boolean?
-
#lang ⇒ String?
Search result language code.
- #like_count ⇒ Integer
-
#media ⇒ Array<XTwitterScraper::Models::TweetMedia>?
Search-result media attachments, omitted when no media is present.
-
#note_tweet ⇒ XTwitterScraper::Models::SearchTweet::NoteTweet?
Complete Note Tweet content and rich-text metadata.
-
#place ⇒ XTwitterScraper::Models::SearchTweet::Place?
Public place metadata attached to a tweet.
- #possibly_sensitive ⇒ Boolean?
-
#previous_counts ⇒ XTwitterScraper::Models::SearchTweet::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 the tweet.
- #text ⇒ String
- #type ⇒ String?
-
#url ⇒ String?
Search result permalink.
- #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/search_tweet.rb', line 237
|
Instance Attribute Details
#article ⇒ XTwitterScraper::Models::SearchTweet::Article?
Article metadata attached to a tweet.
54 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 54 optional :article, -> { XTwitterScraper::SearchTweet::Article } |
#author ⇒ XTwitterScraper::Models::UserProfile?
X user profile with bio, follower counts, and verification status.
60 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 60 optional :author, -> { XTwitterScraper::UserProfile } |
#bookmark_count ⇒ Integer
18 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 18 required :bookmark_count, Integer, api_name: :bookmarkCount |
#card ⇒ XTwitterScraper::Models::SearchTweet::Card?
Public card metadata attached to a tweet.
66 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 66 optional :card, -> { XTwitterScraper::SearchTweet::Card } |
#community_note ⇒ XTwitterScraper::Models::SearchTweet::CommunityNote?
Community Note presentation metadata returned by X.
72 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 72 optional :community_note, -> { XTwitterScraper::SearchTweet::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.
79 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 79 optional :content_disclosure, -> { XTwitterScraper::ContentDisclosure }, api_name: :contentDisclosure |
#conversation_id ⇒ String?
Root tweet ID for the search result conversation
85 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 85 optional :conversation_id, String, api_name: :conversationId |
#created_at ⇒ String?
90 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 90 optional :created_at, String, api_name: :createdAt |
#display_text_range ⇒ Array<Integer>?
Rendered text's start and end offsets.
96 97 98 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 96 optional :display_text_range, XTwitterScraper::Internal::Type::ArrayOf[Integer], api_name: :displayTextRange |
#edit ⇒ XTwitterScraper::Models::SearchTweet::Edit?
Edit history metadata returned by X.
104 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 104 optional :edit, -> { XTwitterScraper::SearchTweet::Edit } |
#entities ⇒ Hash{Symbol=>Object}?
Parsed search-result entities including URLs, mentions, hashtags, and media markers
111 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 111 optional :entities, XTwitterScraper::Internal::Type::HashOf[XTwitterScraper::Internal::Type::Unknown] |
#id ⇒ String
13 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 13 required :id, String |
#in_reply_to_id ⇒ String?
ID of the tweet this result replies to.
117 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 117 optional :in_reply_to_id, String, api_name: :inReplyToId |
#in_reply_to_user_id ⇒ String?
ID of the user this result replies to.
123 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 123 optional :in_reply_to_user_id, String, api_name: :inReplyToUserId |
#in_reply_to_username ⇒ String?
Username this result replies to.
129 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 129 optional :in_reply_to_username, String, api_name: :inReplyToUsername |
#is_limited_reply ⇒ Boolean?
Whether the tweet has limited reply permissions
135 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 135 optional :is_limited_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isLimitedReply |
#is_note_tweet ⇒ Boolean?
True for Note Tweets (long-form content, up to 25,000 characters)
141 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 141 optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet |
#is_quote_status ⇒ Boolean?
True when this search result quotes another tweet
147 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 147 optional :is_quote_status, XTwitterScraper::Internal::Type::Boolean, api_name: :isQuoteStatus |
#is_reply ⇒ Boolean?
True when this search result is a reply
153 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 153 optional :is_reply, XTwitterScraper::Internal::Type::Boolean, api_name: :isReply |
#is_translatable ⇒ Boolean?
158 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 158 optional :is_translatable, XTwitterScraper::Internal::Type::Boolean, api_name: :isTranslatable |
#lang ⇒ String?
Search result language code.
164 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 164 optional :lang, String |
#like_count ⇒ Integer
23 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 23 required :like_count, Integer, api_name: :likeCount |
#media ⇒ Array<XTwitterScraper::Models::TweetMedia>?
Search-result media attachments, omitted when no media is present
170 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 170 optional :media, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::TweetMedia] } |
#note_tweet ⇒ XTwitterScraper::Models::SearchTweet::NoteTweet?
Complete Note Tweet content and rich-text metadata.
176 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 176 optional :note_tweet, -> { XTwitterScraper::SearchTweet::NoteTweet }, api_name: :noteTweet |
#place ⇒ XTwitterScraper::Models::SearchTweet::Place?
Public place metadata attached to a tweet.
182 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 182 optional :place, -> { XTwitterScraper::SearchTweet::Place } |
#possibly_sensitive ⇒ Boolean?
187 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 187 optional :possibly_sensitive, XTwitterScraper::Internal::Type::Boolean, api_name: :possiblySensitive |
#previous_counts ⇒ XTwitterScraper::Models::SearchTweet::PreviousCounts?
Engagement counts retained from a prior tweet edit.
193 194 195 196 197 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 193 optional :previous_counts, -> { XTwitterScraper::SearchTweet::PreviousCounts }, api_name: :previousCounts |
#quote_count ⇒ Integer
28 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 28 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.
205 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 205 optional :quoted_tweet, -> { XTwitterScraper::EmbeddedTweet } |
#reply_count ⇒ Integer
33 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 33 required :reply_count, Integer, api_name: :replyCount |
#retweet_count ⇒ Integer
38 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 38 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.
213 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 213 optional :retweeted_tweet, -> { XTwitterScraper::EmbeddedTweet } |
#source ⇒ String?
Client application used to post the tweet
219 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 219 optional :source, String |
#text ⇒ String
43 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 43 required :text, String |
#type ⇒ String?
224 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 224 optional :type, String |
#url ⇒ String?
Search result permalink.
230 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 230 optional :url, String |
#view_count ⇒ Integer
48 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 48 required :view_count, Integer, api_name: :viewCount |
#view_state ⇒ String?
235 |
# File 'lib/x_twitter_scraper/models/search_tweet.rb', line 235 optional :view_state, String, api_name: :viewState |
Instance Method Details
#to_hash ⇒ ::Hash[Symbol, top]
211 |
# File 'sig/x_twitter_scraper/models/search_tweet.rbs', line 211
def to_hash: -> ::Hash[Symbol, top]
|