Class: XTwitterScraper::Models::X::UserProfile

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

Overview

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:, name:, username:, created_at: nil, description: nil, followers: nil, following: nil, location: nil, profile_picture: nil, statuses_count: nil, verified: nil) ⇒ Object

X user profile with bio, follower counts, and verification status.

Parameters:

  • id (String)
  • name (String)
  • username (String)
  • created_at (String) (defaults to: nil)
  • description (String) (defaults to: nil)
  • followers (Integer) (defaults to: nil)
  • following (Integer) (defaults to: nil)
  • location (String) (defaults to: nil)
  • profile_picture (String) (defaults to: nil)
  • statuses_count (Integer) (defaults to: nil)
  • verified (Boolean) (defaults to: nil)


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

Instance Attribute Details

#created_atString?

Returns:

  • (String, nil)


26
# File 'lib/x_twitter_scraper/models/x/user_profile.rb', line 26

optional :created_at, String, api_name: :createdAt

#descriptionString?

Returns:

  • (String, nil)


31
# File 'lib/x_twitter_scraper/models/x/user_profile.rb', line 31

optional :description, String

#followersInteger?

Returns:

  • (Integer, nil)


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

optional :followers, Integer

#followingInteger?

Returns:

  • (Integer, nil)


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

optional :following, Integer

#idString

Returns:

  • (String)


11
# File 'lib/x_twitter_scraper/models/x/user_profile.rb', line 11

required :id, String

#locationString?

Returns:

  • (String, nil)


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

optional :location, String

#nameString

Returns:

  • (String)


16
# File 'lib/x_twitter_scraper/models/x/user_profile.rb', line 16

required :name, String

#profile_pictureString?

Returns:

  • (String, nil)


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

optional :profile_picture, String, api_name: :profilePicture

#statuses_countInteger?

Returns:

  • (Integer, nil)


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

optional :statuses_count, Integer, api_name: :statusesCount

#usernameString

Returns:

  • (String)


21
# File 'lib/x_twitter_scraper/models/x/user_profile.rb', line 21

required :username, String

#verifiedBoolean?

Returns:

  • (Boolean, nil)


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

optional :verified, XTwitterScraper::Internal::Type::Boolean