class Hamilton::Types::LinkPreviewOptions

Overview

Describes the options used for link preview generation.

Included Modules

Defined in:

types/link_preview_options.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : Hamilton::Any) ==

Instance methods inherited from class Object

===(other : Hamilton::Any) ===

Constructor Detail

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

def self.new(params) #

def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

def self.new(**params) #

Instance Method Detail

def is_disabled : Bool | Nil #

True, if the link preview is disabled.


def is_disabled=(is_disabled : Bool | Nil) #

True, if the link preview is disabled.


def non_nil_fields : Array(String) #

List of available non-nil fields.


def non_nil_fields=(non_nil_fields : Array(String)) #

List of available non-nil fields.


def prefer_large_media : Bool | Nil #

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.


def prefer_large_media=(prefer_large_media : Bool | Nil) #

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.


def prefer_small_media : Bool | Nil #

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.


def prefer_small_media=(prefer_small_media : Bool | Nil) #

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.


def show_above_text : Bool | Nil #

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


def show_above_text=(show_above_text : Bool | Nil) #

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


def url : String | Nil #

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


def url=(url : String | Nil) #

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