Class: TD::Types::LinkPreview

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/link_preview.rb

Overview

Describes a link preview.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#descriptionTD::Types::FormattedText

Description of the content.

Returns:



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def description
  @description
end

#display_urlTD::Types::String

URL to display.

Returns:

  • (TD::Types::String)

    the current value of display_url



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def display_url
  @display_url
end

#has_large_mediaBoolean

True, if size of media in the preview can be changed.

Returns:

  • (Boolean)

    the current value of has_large_media



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def has_large_media
  @has_large_media
end

#instant_view_versionInteger

Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.

Returns:

  • (Integer)

    the current value of instant_view_version



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def instant_view_version
  @instant_view_version
end

#show_above_textBoolean

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

Returns:

  • (Boolean)

    the current value of show_above_text



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def show_above_text
  @show_above_text
end

#show_large_mediaBoolean

True, if large media preview must be shown; otherwise, the media preview must be shown small and only the first frame must be shown for videos.

Returns:

  • (Boolean)

    the current value of show_large_media



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def show_large_media
  @show_large_media
end

#show_media_above_descriptionBoolean

True, if media must be shown above link preview description; otherwise, the media must be shown below the description.

Returns:

  • (Boolean)

    the current value of show_media_above_description



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def show_media_above_description
  @show_media_above_description
end

#site_nameTD::Types::String

Short name of the site (e.g., Google Docs, App Store).

Returns:

  • (TD::Types::String)

    the current value of site_name



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def site_name
  @site_name
end

#skip_confirmationBoolean

True, if there is no need to show an ordinary open URL confirmation, when opening the URL from the preview, because the URL is shown in the message text in clear.

Returns:

  • (Boolean)

    the current value of skip_confirmation



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def skip_confirmation
  @skip_confirmation
end

#titleTD::Types::String

Title of the content.

Returns:

  • (TD::Types::String)

    the current value of title



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def title
  @title
end

#typeTD::Types::LinkPreviewType

Type of the link preview.

Returns:



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def type
  @type
end

#urlTD::Types::String

Original URL of the link.

Returns:

  • (TD::Types::String)

    the current value of url



21
22
23
# File 'lib/tdlib/types/link_preview.rb', line 21

def url
  @url
end