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

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

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:, followers:, username:, verified:, profile_picture: nil) ⇒ Object

Author of a tweet with follower count and verification status.

Parameters:

  • id (String)
  • followers (Integer)
  • username (String)
  • verified (Boolean)
  • profile_picture (String) (defaults to: nil)


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

Instance Attribute Details

#followersInteger

Returns:

  • (Integer)


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

required :followers, Integer

#idString

Returns:

  • (String)


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

required :id, String

#profile_pictureString?

Returns:

  • (String, nil)


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

optional :profile_picture, String, api_name: :profilePicture

#usernameString

Returns:

  • (String)


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

required :username, String

#verifiedBoolean

Returns:

  • (Boolean)


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

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