List of all members | Public Fields | Public Instance Methods | Static Public Attributes
linkPreview Class Referencefinal

Inherits Object.

Description

Describes a link preview.

Public Fields

string url_
 Original URL of the link.
 
string display_url_
 URL to display.
 
string site_name_
 Short name of the site (e.g., Google Docs, App Store).
 
string title_
 Title of the content.
 
object_ptr< formattedTextdescription_
 Description of the content.
 
string author_
 Author of the content.
 
object_ptr< LinkPreviewTypetype_
 Type of the link preview.
 
bool has_large_media_
 True, if size of media in the preview can be changed.
 
bool show_large_media_
 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.
 
bool show_media_above_description_
 True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
 
bool skip_confirmation_
 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.
 
bool show_above_text_
 True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
 
int32 instant_view_version_
 Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.
 

Public Instance Methods

 linkPreview ()
 
 linkPreview (string const &url_, string const &display_url_, string const &site_name_, string const &title_, object_ptr< formattedText > &&description_, string const &author_, object_ptr< LinkPreviewType > &&type_, bool has_large_media_, bool show_large_media_, bool show_media_above_description_, bool skip_confirmation_, bool show_above_text_, int32 instant_view_version_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

static const std::int32_t ID = 1729417714
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ linkPreview() [1/2]

Describes a link preview.

◆ linkPreview() [2/2]

linkPreview ( string const &  url_,
string const &  display_url_,
string const &  site_name_,
string const &  title_,
object_ptr< formattedText > &&  description_,
string const &  author_,
object_ptr< LinkPreviewType > &&  type_,
bool  has_large_media_,
bool  show_large_media_,
bool  show_media_above_description_,
bool  skip_confirmation_,
bool  show_above_text_,
int32  instant_view_version_ 
)

Describes a link preview.

Parameters
[in]url_Original URL of the link.
[in]display_url_URL to display.
[in]site_name_Short name of the site (e.g., Google Docs, App Store).
[in]title_Title of the content.
[in]description_Description of the content.
[in]author_Author of the content.
[in]type_Type of the link preview.
[in]has_large_media_True, if size of media in the preview can be changed.
[in]show_large_media_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.
[in]show_media_above_description_True, if media must be shown above link preview description; otherwise, the media must be shown below the description.
[in]skip_confirmation_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.
[in]show_above_text_True, if the link preview must be shown above message text; otherwise, the link preview must be shown below the message text.
[in]instant_view_version_Version of instant view (currently, can be 1 or 2) for the web page; 0 if none.

Method Documentation

◆ store()

void store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: