class

Tourmaline::LinkPreviewOptions

Inherits JSON::Serializable < Reference < Object

Describes the options used for link preview generation.

Constructors

new(is_disabled : Bool | Nil = nil, url : String | Nil = nil, prefer_small_media : Bool | Nil = nil, prefer_large_media : Bool | Nil = nil, show_above_text : Bool | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

is_disabled=(is_disabled : Bool | Nil)

Optional. True, if the link preview is disabled

Source
is_disabled?

Optional. True, if the link preview is disabled

Source
prefer_large_media=(prefer_large_media : Bool | Nil)

Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview

Source
prefer_large_media?

Optional. True, if the media in the link preview is supposed to be enlarged; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview

Source
prefer_small_media=(prefer_small_media : Bool | Nil)

Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview

Source
prefer_small_media?

Optional. True, if the media in the link preview is supposed to be shrunk; ignored if the URL isn't explicitly specified or media size change isn't supported for the preview

Source
show_above_text=(show_above_text : Bool | Nil)

Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text

Source
show_above_text?

Optional. True, if the link preview must be shown above the message text; otherwise, the link preview will be shown below the message text

Source
url

Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used

Source
url=(url : String | Nil)

Optional. URL to use for the link preview. If empty, then the first URL found in the message text will be used

Source