Class: XTwitterScraper::Models::XGetArticleResponse::Article::Content
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- XTwitterScraper::Models::XGetArticleResponse::Article::Content
- Defined in:
- lib/x_twitter_scraper/models/x_get_article_response.rb,
sig/x_twitter_scraper/models/x_get_article_response.rbs
Defined Under Namespace
Classes: InlineStyleRange
Instance Attribute Summary collapse
- #height ⇒ Integer?
-
#inline_style_ranges ⇒ Array<XTwitterScraper::Models::XGetArticleResponse::Article::Content::InlineStyleRange>?
Inline text formatting ranges.
-
#preview_url ⇒ String?
Preview image URL for media blocks.
- #text ⇒ String?
-
#type ⇒ String?
Block type: paragraph, header-one, header-two, header-three, header-four, header-five, header-six, unordered-list-item, ordered-list-item, blockquote, code-block, media, divider.
-
#url ⇒ String?
Media URL for media blocks.
- #width ⇒ Integer?
Instance Method Summary collapse
- #initialize(body_text: nil, contents: nil, cover_image_url: nil, created_at: nil, like_count: nil, preview_text: nil, quote_count: nil, reply_count: nil, title: nil, view_count: nil) ⇒ Object constructor
- #to_hash ⇒ {
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(body_text: nil, contents: nil, cover_image_url: nil, created_at: nil, like_count: nil, preview_text: nil, quote_count: nil, reply_count: nil, title: nil, view_count: nil) ⇒ Object
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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 98 class Content < XTwitterScraper::Internal::Type::BaseModel # @!attribute height # # @return [Integer, nil] optional :height, Integer # @!attribute inline_style_ranges # Inline text formatting ranges # # @return [Array<XTwitterScraper::Models::XGetArticleResponse::Article::Content::InlineStyleRange>, nil] optional :inline_style_ranges, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::XGetArticleResponse::Article::Content::InlineStyleRange] }, api_name: :inlineStyleRanges # @!attribute preview_url # Preview image URL for media blocks # # @return [String, nil] optional :preview_url, String, api_name: :previewUrl # @!attribute text # # @return [String, nil] optional :text, String # @!attribute type # Block type: paragraph, header-one, header-two, header-three, header-four, # header-five, header-six, unordered-list-item, ordered-list-item, blockquote, # code-block, media, divider # # @return [String, nil] optional :type, String # @!attribute url # Media URL for media blocks # # @return [String, nil] optional :url, String # @!attribute width # # @return [Integer, nil] optional :width, Integer # @!method initialize(height: nil, inline_style_ranges: nil, preview_url: 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 inline_style_ranges [Array<XTwitterScraper::Models::XGetArticleResponse::Article::Content::InlineStyleRange>] Inline text formatting ranges # # @param preview_url [String] Preview image URL for media blocks # # @param text [String] # # @param type [String] Block type: paragraph, header-one, header-two, header-three, header-four, header # # @param url [String] Media URL for media blocks # # @param width [Integer] class InlineStyleRange < XTwitterScraper::Internal::Type::BaseModel # @!attribute length # # @return [Integer, nil] optional :length, Integer # @!attribute offset # # @return [Integer, nil] optional :offset, Integer # @!attribute style # # @return [String, nil] optional :style, String # @!method initialize(length: nil, offset: nil, style: nil) # @param length [Integer] # @param offset [Integer] # @param style [String] end end |
Instance Attribute Details
#height ⇒ Integer?
102 |
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 102 optional :height, Integer |
#inline_style_ranges ⇒ Array<XTwitterScraper::Models::XGetArticleResponse::Article::Content::InlineStyleRange>?
Inline text formatting ranges
108 109 110 |
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 108 optional :inline_style_ranges, -> { XTwitterScraper::Internal::Type::ArrayOf[XTwitterScraper::Models::XGetArticleResponse::Article::Content::InlineStyleRange] }, api_name: :inlineStyleRanges |
#preview_url ⇒ String?
Preview image URL for media blocks
116 |
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 116 optional :preview_url, String, api_name: :previewUrl |
#text ⇒ String?
121 |
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 121 optional :text, String |
#type ⇒ String?
Block type: paragraph, header-one, header-two, header-three, header-four, header-five, header-six, unordered-list-item, ordered-list-item, blockquote, code-block, media, divider
129 |
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 129 optional :type, String |
#url ⇒ String?
Media URL for media blocks
135 |
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 135 optional :url, String |
#width ⇒ Integer?
140 |
# File 'lib/x_twitter_scraper/models/x_get_article_response.rb', line 140 optional :width, Integer |
Instance Method Details
#to_hash ⇒ {
163 |
# File 'sig/x_twitter_scraper/models/x_get_article_response.rbs', line 163
def to_hash: -> {
|