Class: XTwitterScraper::Models::X::TweetDetail::Media
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- XTwitterScraper::Models::X::TweetDetail::Media
- Defined in:
- lib/x_twitter_scraper/models/x/tweet_detail.rb
Defined Under Namespace
Modules: Type
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(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 # @!attribute media_url # # @return [String, nil] optional :media_url, String, api_name: :mediaUrl # @!attribute type # # @return [Symbol, XTwitterScraper::Models::X::TweetDetail::Media::Type, nil] optional :type, enum: -> { XTwitterScraper::X::TweetDetail::Media::Type } # @!attribute url # # @return [String, nil] optional :url, String # @!method initialize(media_url: nil, type: nil, url: nil) # @param media_url [String] # @param type [Symbol, XTwitterScraper::Models::X::TweetDetail::Media::Type] # @param url [String] # @see XTwitterScraper::Models::X::TweetDetail::Media#type module Type extend XTwitterScraper::Internal::Type::Enum PHOTO = :photo VIDEO = :video ANIMATED_GIF = :animated_gif # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#media_url ⇒ String?
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 |