Class: XTwitterScraper::Models::StyleGetPerformanceResponse::Tweet

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/style_get_performance_response.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:, text:, created_at: nil, like_count: nil, reply_count: nil, retweet_count: nil, view_count: nil) ⇒ Object

Parameters:

  • id (String)
  • text (String)
  • created_at (String) (defaults to: nil)
  • like_count (Integer) (defaults to: nil)
  • reply_count (Integer) (defaults to: nil)
  • retweet_count (Integer) (defaults to: nil)
  • view_count (Integer) (defaults to: nil)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/x_twitter_scraper/models/style_get_performance_response.rb', line 28

class Tweet < XTwitterScraper::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute text
  #
  #   @return [String]
  required :text, String

  # @!attribute created_at
  #
  #   @return [String, nil]
  optional :created_at, String, api_name: :createdAt

  # @!attribute like_count
  #
  #   @return [Integer, nil]
  optional :like_count, Integer, api_name: :likeCount

  # @!attribute reply_count
  #
  #   @return [Integer, nil]
  optional :reply_count, Integer, api_name: :replyCount

  # @!attribute retweet_count
  #
  #   @return [Integer, nil]
  optional :retweet_count, Integer, api_name: :retweetCount

  # @!attribute view_count
  #
  #   @return [Integer, nil]
  optional :view_count, Integer, api_name: :viewCount

  # @!method initialize(id:, text:, created_at: nil, like_count: nil, reply_count: nil, retweet_count: nil, view_count: nil)
  #   @param id [String]
  #   @param text [String]
  #   @param created_at [String]
  #   @param like_count [Integer]
  #   @param reply_count [Integer]
  #   @param retweet_count [Integer]
  #   @param view_count [Integer]
end

Instance Attribute Details

#created_atString?

Returns:

  • (String, nil)


42
# File 'lib/x_twitter_scraper/models/style_get_performance_response.rb', line 42

optional :created_at, String, api_name: :createdAt

#idString

Returns:

  • (String)


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

required :id, String

#like_countInteger?

Returns:

  • (Integer, nil)


47
# File 'lib/x_twitter_scraper/models/style_get_performance_response.rb', line 47

optional :like_count, Integer, api_name: :likeCount

#reply_countInteger?

Returns:

  • (Integer, nil)


52
# File 'lib/x_twitter_scraper/models/style_get_performance_response.rb', line 52

optional :reply_count, Integer, api_name: :replyCount

#retweet_countInteger?

Returns:

  • (Integer, nil)


57
# File 'lib/x_twitter_scraper/models/style_get_performance_response.rb', line 57

optional :retweet_count, Integer, api_name: :retweetCount

#textString

Returns:

  • (String)


37
# File 'lib/x_twitter_scraper/models/style_get_performance_response.rb', line 37

required :text, String

#view_countInteger?

Returns:

  • (Integer, nil)


62
# File 'lib/x_twitter_scraper/models/style_get_performance_response.rb', line 62

optional :view_count, Integer, api_name: :viewCount