Class: XTwitterScraper::Models::X::TweetAuthor

Inherits:
UserProfile show all
Defined in:
lib/x_twitter_scraper/models/x/tweet_author.rb,
sig/x_twitter_scraper/models/x/tweet_author.rbs

Instance Attribute Summary collapse

Attributes inherited from UserProfile

#automated_by, #can_dm, #community_role, #cover_picture, #created_at, #description, #favourites_count, #following, #has_custom_timelines, #id, #is_automated, #is_blue_verified, #is_translator, #is_verified, #location, #media_count, #name, #pinned_tweet_ids, #possibly_sensitive, #profile_banner_url, #profile_bio, #profile_picture, #protected, #statuses_count, #unavailable, #unavailable_reason, #url, #username, #verified_type, #viewer_followed_by, #viewer_following, #withheld_in_countries

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(followers:, verified:) ⇒ TweetAuthor

Tweet author profile. The lookup route always includes follower count and verification state. Other profile fields appear when available.

Parameters:

  • followers (Integer)
  • verified (Boolean)
  • followers: (Integer)
  • verified: (Boolean)


# File 'lib/x_twitter_scraper/models/x/tweet_author.rb', line 17

Instance Attribute Details

#followersInteger

Parameters:

  • _ (Integer)

Returns:

  • (Integer)


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

required :followers, Integer

#verifiedBoolean

Parameters:

  • _ (Boolean)

Returns:

  • (Boolean)


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

required :verified, XTwitterScraper::Internal::Type::Boolean

Instance Method Details

#to_hash{ followers: Integer, verified: bool }

Returns:

  • ({ followers: Integer, verified: bool })


17
# File 'sig/x_twitter_scraper/models/x/tweet_author.rbs', line 17

def to_hash: -> { followers: Integer, verified: bool }