Class: XTwitterScraper::Models::X::SearchTweet

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/x/search_tweet.rb

Defined Under Namespace

Classes: Author

Instance Attribute Summary collapse

Instance Method Summary collapse

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:, text:, author: nil, bookmark_count: nil, created_at: nil, is_note_tweet: nil, like_count: nil, quote_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) ⇒ Object

Tweet returned from search results with inline author info.

Parameters:

  • id (String)
  • text (String)
  • author (XTwitterScraper::Models::X::SearchTweet::Author) (defaults to: nil)
  • bookmark_count (Integer) (defaults to: nil)
  • created_at (String) (defaults to: nil)
  • is_note_tweet (Boolean) (defaults to: nil)

    True for Note Tweets (long-form content, up to 25,000 characters)

  • like_count (Integer) (defaults to: nil)
  • quote_count (Integer) (defaults to: nil)
  • reply_count (Integer) (defaults to: nil)
  • retweet_count (Integer) (defaults to: nil)
  • view_count (Integer) (defaults to: nil)


# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 63

Instance Attribute Details

#authorXTwitterScraper::Models::X::SearchTweet::Author?



20
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 20

optional :author, -> { XTwitterScraper::X::SearchTweet::Author }

#bookmark_countInteger?

Returns:

  • (Integer, nil)


25
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 25

optional :bookmark_count, Integer, api_name: :bookmarkCount

#created_atString?

Returns:

  • (String, nil)


30
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 30

optional :created_at, String, api_name: :createdAt

#idString

Returns:

  • (String)


10
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 10

required :id, String

#is_note_tweetBoolean?

True for Note Tweets (long-form content, up to 25,000 characters)

Returns:

  • (Boolean, nil)


36
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 36

optional :is_note_tweet, XTwitterScraper::Internal::Type::Boolean, api_name: :isNoteTweet

#like_countInteger?

Returns:

  • (Integer, nil)


41
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 41

optional :like_count, Integer, api_name: :likeCount

#quote_countInteger?

Returns:

  • (Integer, nil)


46
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 46

optional :quote_count, Integer, api_name: :quoteCount

#reply_countInteger?

Returns:

  • (Integer, nil)


51
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 51

optional :reply_count, Integer, api_name: :replyCount

#retweet_countInteger?

Returns:

  • (Integer, nil)


56
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 56

optional :retweet_count, Integer, api_name: :retweetCount

#textString

Returns:

  • (String)


15
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 15

required :text, String

#view_countInteger?

Returns:

  • (Integer, nil)


61
# File 'lib/x_twitter_scraper/models/x/search_tweet.rb', line 61

optional :view_count, Integer, api_name: :viewCount