Class: Mastodon::Media

Inherits:
Base
  • Object
show all
Defined in:
lib/mastodon/media.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Instance Method Summary collapse

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

#idInteger (readonly)

Returns:

  • (Integer)


14
# File 'lib/mastodon/media.rb', line 14

normal_attr_reader :id, :type, :url, :preview_url, :text_url

#preview_urlString (readonly)

Returns URL to preview image.

Returns:

  • (String)

    URL to preview image



14
# File 'lib/mastodon/media.rb', line 14

normal_attr_reader :id, :type, :url, :preview_url, :text_url

#text_urlString (readonly)

Returns URL that can be put into status body and will redirect to the status/media.

Returns:

  • (String)

    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

#typeString (readonly)

Returns Image or video.

Returns:

  • (String)

    Image or video



14
# File 'lib/mastodon/media.rb', line 14

normal_attr_reader :id, :type, :url, :preview_url, :text_url

#urlString (readonly)

Returns Full file URL.

Returns:

  • (String)

    Full file URL



14
# File 'lib/mastodon/media.rb', line 14

normal_attr_reader :id, :type, :url, :preview_url, :text_url