Skip to content

class Tourmaline::LinkPreviewOptions
inherits Reference #

Describes the options used for link preview generation.

Included modules

JSON::Serializable

Constructors#

.new(pull : JSON::PullParser) #

View source

.new(is_disabled : Bool? = nil, url : String? = nil, prefer_small_media : Bool? = nil, prefer_large_media : Bool? = nil, show_above_text : Bool? = nil) #

View source

Methods#

#is_disabled=(is_disabled : Bool?) #

Optional. True, if the link preview is disabled

View source

#is_disabled? : Bool? #

Optional. True, if the link preview is disabled

View source

#prefer_large_media=(prefer_large_media : Bool?) #

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

View source

#prefer_large_media? : Bool? #

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

View source

#prefer_small_media=(prefer_small_media : Bool?) #

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

View source

#prefer_small_media? : Bool? #

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

View source

#show_above_text=(show_above_text : Bool?) #

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

View source

#show_above_text? : Bool? #

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

View source

#url : String? #

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

View source

#url=(url : String?) #

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

View source