Class: XTwitterScraper::Models::X::TweetDetail::Media
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
Instance Method Summary
collapse
==, #==, #[], 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
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(media_url: nil, type: nil, url: nil) ⇒ Object
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
|
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 137
class Media < XTwitterScraper::Internal::Type::BaseModel
optional :media_url, String, api_name: :mediaUrl
optional :type, enum: -> { XTwitterScraper::X::TweetDetail::Media::Type }
optional :url, String
module Type
extend XTwitterScraper::Internal::Type::Enum
PHOTO = :photo
VIDEO = :video
ANIMATED_GIF = :animated_gif
end
end
|
Instance Attribute Details
141
|
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 141
optional :media_url, String, api_name: :mediaUrl
|
#type ⇒ Symbol, ...
146
|
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 146
optional :type, enum: -> { XTwitterScraper::X::TweetDetail::Media::Type }
|
#url ⇒ String?
151
|
# File 'lib/x_twitter_scraper/models/x/tweet_detail.rb', line 151
optional :url, String
|
Instance Method Details
#to_hash ⇒ {
148
|
# File 'sig/x_twitter_scraper/models/x/tweet_detail.rbs', line 148
def to_hash: -> {
|