Class: Mastodon::Media
Instance Attribute Summary collapse
- #id ⇒ Integer readonly
-
#preview_url ⇒ String
readonly
URL to preview image.
-
#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.
16 17 18 |
# File 'lib/mastodon/media.rb', line 16 def initialize(attributes = {}) attributes.fetch('id') end |
Instance Attribute Details
#id ⇒ Integer (readonly)
14 |
# File 'lib/mastodon/media.rb', line 14 normal_attr_reader :id, :type, :url, :preview_url, :text_url |
#preview_url ⇒ String (readonly)
Returns URL to preview image.
14 |
# File 'lib/mastodon/media.rb', line 14 normal_attr_reader :id, :type, :url, :preview_url, :text_url |
#text_url ⇒ String (readonly)
Returns URL that can be put into status body and will redirect to the status/media.
14 |
# File 'lib/mastodon/media.rb', line 14 normal_attr_reader :id, :type, :url, :preview_url, :text_url |
#type ⇒ String (readonly)
Returns Image or video.
14 |
# File 'lib/mastodon/media.rb', line 14 normal_attr_reader :id, :type, :url, :preview_url, :text_url |
#url ⇒ String (readonly)
Returns Full file URL.
14 |
# File 'lib/mastodon/media.rb', line 14 normal_attr_reader :id, :type, :url, :preview_url, :text_url |