class Tourmaline::LinkPreviewOptions

Overview

Describes the options used for link preview generation.

Included Modules

Defined in:

tourmaline/types/api.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.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) #

[View source]

Instance Method Detail

def is_disabled=(is_disabled : Bool | Nil) #

Optional. True, if the link preview is disabled


[View source]
def is_disabled? : Bool | Nil #

Optional. True, if the link preview is disabled


[View source]
def prefer_large_media=(prefer_large_media : Bool | Nil) #

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


[View source]
def prefer_large_media? : Bool | Nil #

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


[View source]
def prefer_small_media=(prefer_small_media : Bool | Nil) #

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


[View source]
def prefer_small_media? : Bool | Nil #

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


[View source]
def 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


[View source]
def 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


[View source]
def 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


[View source]
def 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


[View source]