Card

@Serializable
sealed class Card

Represents a rich preview card that is generated using OpenGraph tags from a URL.

Inheritors

Types

Link copied to clipboard
@Serializable
data class Link(val url: String, val title: String, val description: String, val authorName: String? = null, val authorUrl: String? = null, val providerName: String? = null, val providerUrl: String? = null, val html: String? = null, val width: Long? = null, val height: Long? = null, val image: String? = null, val embedUrl: String? = null, val blurHash: String? = null) : Card
Link copied to clipboard
@Serializable
data class Photo(val url: String, val title: String, val description: String, val authorName: String? = null, val authorUrl: String? = null, val providerName: String? = null, val providerUrl: String? = null, val html: String? = null, val width: Long? = null, val height: Long? = null, val image: String? = null, val embedUrl: String? = null, val blurHash: String? = null) : Card
Link copied to clipboard
@Serializable
data class Rich(val url: String, val title: String, val description: String, val authorName: String? = null, val authorUrl: String? = null, val providerName: String? = null, val providerUrl: String? = null, val html: String? = null, val width: Long? = null, val height: Long? = null, val image: String? = null, val embedUrl: String? = null, val blurHash: String? = null) : Card
Link copied to clipboard
@Serializable
data class Video(val url: String, val title: String, val description: String, val authorName: String? = null, val authorUrl: String? = null, val providerName: String? = null, val providerUrl: String? = null, val html: String? = null, val width: Long? = null, val height: Long? = null, val image: String? = null, val embedUrl: String? = null, val blurHash: String? = null) : Card

Properties

Link copied to clipboard
abstract val authorName: String?

The author of the original resource.

Link copied to clipboard
abstract val authorUrl: String?

URL to the author of the original resource.

Link copied to clipboard
abstract val blurHash: String?

A hash computed by the BlurHash algorithm.

Link copied to clipboard
abstract val description: String

Description of preview.

Link copied to clipboard
abstract val embedUrl: String?

URL used for photo embeds, instead of custom HTML.

Link copied to clipboard
abstract val height: Long?

Height of preview, in pixels.

Link copied to clipboard
abstract val html: String?

HTML to be used for generating the preview card.

Link copied to clipboard
abstract val image: String?

URL of a preview thumbnail.

Link copied to clipboard
abstract val providerName: String?

The provider of the original resource.

Link copied to clipboard
abstract val providerUrl: String?

URL to the provider of the original resource.

Link copied to clipboard
abstract val title: String

Title of linked resource.

Link copied to clipboard
abstract val url: String

URL of linked resource.

Link copied to clipboard
abstract val width: Long?

Width of preview, in pixels.