Class: Mastodon::Media
Instance Attribute Summary collapse
- #description ⇒ String readonly
- #id ⇒ String readonly
- #meta ⇒ Hash readonly
-
#preview_url ⇒ String
readonly
URL to preview image.
- #remote_url ⇒ String readonly
-
#text_url ⇒ String
readonly
URL that can be put into status body and will redirect to the status/media.
-
#type ⇒ String
readonly
Image or video.
-
#url ⇒ String
readonly
Full file URL.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Media
constructor
A new instance of Media.
Methods inherited from Base
collection_attr_reader, define_attribute_method, define_predicate_method, normal_attr_reader, object_attr_reader, predicate_attr_reader
Constructor Details
#initialize(attributes = {}) ⇒ Media
Returns a new instance of Media.
29 30 31 32 |
# File 'lib/mastodon/media.rb', line 29 def initialize(attributes = {}) attributes.fetch('id') super end |
Instance Attribute Details
#description ⇒ String (readonly)
20 21 22 23 24 25 26 27 |
# File 'lib/mastodon/media.rb', line 20 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#id ⇒ String (readonly)
20 21 22 23 24 25 26 27 |
# File 'lib/mastodon/media.rb', line 20 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#meta ⇒ Hash (readonly)
20 21 22 23 24 25 26 27 |
# File 'lib/mastodon/media.rb', line 20 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#preview_url ⇒ String (readonly)
Returns URL to preview image.
20 21 22 23 24 25 26 27 |
# File 'lib/mastodon/media.rb', line 20 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#remote_url ⇒ String (readonly)
20 21 22 23 24 25 26 27 |
# File 'lib/mastodon/media.rb', line 20 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#text_url ⇒ String (readonly)
Returns URL that can be put into status body and will redirect to the status/media.
20 21 22 23 24 25 26 27 |
# File 'lib/mastodon/media.rb', line 20 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#type ⇒ String (readonly)
Returns Image or video.
20 21 22 23 24 25 26 27 |
# File 'lib/mastodon/media.rb', line 20 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#url ⇒ String (readonly)
Returns Full file URL.
20 21 22 23 24 25 26 27 |
# File 'lib/mastodon/media.rb', line 20 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |