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.
32 33 34 35 |
# File 'lib/mastodon/media.rb', line 32 def initialize(attributes = {}) attributes.fetch('id') super end |
Instance Attribute Details
#description ⇒ String (readonly)
23 24 25 26 27 28 29 30 |
# File 'lib/mastodon/media.rb', line 23 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#id ⇒ String (readonly)
23 24 25 26 27 28 29 30 |
# File 'lib/mastodon/media.rb', line 23 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#meta ⇒ Hash (readonly)
23 24 25 26 27 28 29 30 |
# File 'lib/mastodon/media.rb', line 23 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#preview_url ⇒ String (readonly)
Returns URL to preview image.
23 24 25 26 27 28 29 30 |
# File 'lib/mastodon/media.rb', line 23 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#remote_url ⇒ String (readonly)
23 24 25 26 27 28 29 30 |
# File 'lib/mastodon/media.rb', line 23 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.
23 24 25 26 27 28 29 30 |
# File 'lib/mastodon/media.rb', line 23 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#type ⇒ String (readonly)
Returns Image or video.
23 24 25 26 27 28 29 30 |
# File 'lib/mastodon/media.rb', line 23 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |
#url ⇒ String (readonly)
Returns Full file URL.
23 24 25 26 27 28 29 30 |
# File 'lib/mastodon/media.rb', line 23 normal_attr_reader :id, :type, :url, :remote_url, :preview_url, :text_url, :meta, :description |