Class: OnyxCord::Components::MediaItem
- Inherits:
-
Object
- Object
- OnyxCord::Components::MediaItem
- Defined in:
- lib/onyxcord/models/component.rb
Overview
Resolved metadata about a piece of media.
Instance Attribute Summary collapse
-
#attachment_id ⇒ Integer?
readonly
The ID of the uploaded attachment.
-
#content_type ⇒ String?
readonly
The content type of the media item.
-
#height ⇒ Integer?
readonly
The height of the media item.
-
#proxy_url ⇒ String?
readonly
The proxied URL to the media item.
-
#url ⇒ String
readonly
The URL to the media item.
-
#width ⇒ Integer?
readonly
The width of the media item.
Instance Attribute Details
#attachment_id ⇒ Integer? (readonly)
Returns the ID of the uploaded attachment. Only present
when the media item was uploaded via an attachment://<filename> reference.
472 473 474 |
# File 'lib/onyxcord/models/component.rb', line 472 def @attachment_id end |
#content_type ⇒ String? (readonly)
Returns the content type of the media item.
468 469 470 |
# File 'lib/onyxcord/models/component.rb', line 468 def content_type @content_type end |
#height ⇒ Integer? (readonly)
Returns the height of the media item.
462 463 464 |
# File 'lib/onyxcord/models/component.rb', line 462 def height @height end |
#proxy_url ⇒ String? (readonly)
Returns the proxied URL to the media item.
465 466 467 |
# File 'lib/onyxcord/models/component.rb', line 465 def proxy_url @proxy_url end |
#url ⇒ String (readonly)
Returns the URL to the media item.
456 457 458 |
# File 'lib/onyxcord/models/component.rb', line 456 def url @url end |
#width ⇒ Integer? (readonly)
Returns the width of the media item.
459 460 461 |
# File 'lib/onyxcord/models/component.rb', line 459 def width @width end |