Attachment

@Serializable
sealed class Attachment

Represents a file or media attachment that can be added to a status.

Inheritors

Types

Link copied to clipboard
@Serializable
data class Audio(val attachmentId: String, val url: String, val previewUrl: String? = null, val remoteUrl: String? = null, val previewRemoteUrl: String? = null, val textUrl: String? = null, val description: String? = null, val blurHash: String? = null, val meta: Attachment.Audio.Meta = Meta()) : Attachment
Link copied to clipboard
@Serializable
data class Gifv(val attachmentId: String, val url: String, val previewUrl: String? = null, val remoteUrl: String? = null, val previewRemoteUrl: String? = null, val textUrl: String? = null, val description: String? = null, val blurHash: String? = null, val meta: Attachment.Gifv.Meta = Meta()) : Attachment
Link copied to clipboard
@Serializable
data class Image(val attachmentId: String, val url: String, val previewUrl: String? = null, val remoteUrl: String? = null, val previewRemoteUrl: String? = null, val textUrl: String? = null, val description: String? = null, val blurHash: String? = null, val meta: Attachment.Image.Meta = Meta()) : Attachment
Link copied to clipboard
@Serializable
data class Unknown(val attachmentId: String, val url: String, val previewUrl: String? = null, val remoteUrl: String? = null, val previewRemoteUrl: String? = null, val textUrl: String? = null, val description: String? = null, val blurHash: String? = null) : Attachment
Link copied to clipboard
@Serializable
data class Video(val attachmentId: String, val url: String, val previewUrl: String? = null, val remoteUrl: String? = null, val previewRemoteUrl: String? = null, val textUrl: String? = null, val description: String? = null, val blurHash: String? = null, val meta: Attachment.Video.Meta = Meta()) : Attachment

Properties

Link copied to clipboard
abstract val attachmentId: String
Link copied to clipboard
abstract val blurHash: String?

A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet.

Link copied to clipboard
abstract val description: String?

Alternate text that describes what is in the media attachment.

Link copied to clipboard
abstract val previewRemoteUrl: String?

URL of a scaled-down preview of the attachment on the remote website.

Link copied to clipboard
abstract val previewUrl: String?

URL of a scaled-down preview of the attachment.

Link copied to clipboard
abstract val remoteUrl: String?

URL of the full-size original attachment on the remote website.

Link copied to clipboard
abstract val textUrl: String?

A shorter URL for the attachment.

Link copied to clipboard
abstract val url: String

URL of the original full-size attachment.