Class: XTwitterScraper::Models::XGetArticleResponse::Article::Content

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/x_twitter_scraper/models/x_get_article_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(height: nil, text: nil, type: nil, url: nil, width: nil) ⇒ Object

Some parameter documentations has been truncated, see XTwitterScraper::Models::XGetArticleResponse::Article::Content for more details.

Parameters:

  • height (Integer) (defaults to: nil)
  • text (String) (defaults to: nil)
  • type (String) (defaults to: nil)

    Block type: unstyled, header-one, header-two, header-three, unordered-list-item,

  • url (String) (defaults to: nil)

    Media URL for image/gif blocks

  • width (Integer) (defaults to: nil)


82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 82

class Content < XTwitterScraper::Internal::Type::BaseModel
  # @!attribute height
  #
  #   @return [Integer, nil]
  optional :height, Integer

  # @!attribute text
  #
  #   @return [String, nil]
  optional :text, String

  # @!attribute type
  #   Block type: unstyled, header-one, header-two, header-three, unordered-list-item,
  #   ordered-list-item, image, gif, divider
  #
  #   @return [String, nil]
  optional :type, String

  # @!attribute url
  #   Media URL for image/gif blocks
  #
  #   @return [String, nil]
  optional :url, String

  # @!attribute width
  #
  #   @return [Integer, nil]
  optional :width, Integer

  # @!method initialize(height: nil, text: nil, type: nil, url: nil, width: nil)
  #   Some parameter documentations has been truncated, see
  #   {XTwitterScraper::Models::XGetArticleResponse::Article::Content} for more
  #   details.
  #
  #   @param height [Integer]
  #
  #   @param text [String]
  #
  #   @param type [String] Block type: unstyled, header-one, header-two, header-three, unordered-list-item,
  #
  #   @param url [String] Media URL for image/gif blocks
  #
  #   @param width [Integer]
end

Instance Attribute Details

#heightInteger?

Returns:

  • (Integer, nil)


86
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 86

optional :height, Integer

#textString?

Returns:

  • (String, nil)


91
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 91

optional :text, String

#typeString?

Block type: unstyled, header-one, header-two, header-three, unordered-list-item, ordered-list-item, image, gif, divider

Returns:

  • (String, nil)


98
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 98

optional :type, String

#urlString?

Media URL for image/gif blocks

Returns:

  • (String, nil)


104
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 104

optional :url, String

#widthInteger?

Returns:

  • (Integer, nil)


109
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 109

optional :width, Integer