List of all members | Public Fields | Public Instance Methods | Static Public Attributes
webPage 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 type_
 Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else.
 
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.
 
object_ptr< photophoto_
 Image representing the content; may be null.
 
string embed_url_
 URL to show in the embedded preview.
 
string embed_type_
 MIME type of the embedded preview, (e.g., text/html or video/mp4).
 
int32 embed_width_
 Width of the embedded preview.
 
int32 embed_height_
 Height of the embedded preview.
 
int32 duration_
 Duration of the content, in seconds.
 
string author_
 Author of the content.
 
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 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.
 
object_ptr< animationanimation_
 Preview of the content as an animation, if available; may be null.
 
object_ptr< audioaudio_
 Preview of the content as an audio file, if available; may be null.
 
object_ptr< documentdocument_
 Preview of the content as a document, if available; may be null.
 
object_ptr< stickersticker_
 Preview of the content as a sticker for small WEBP files, if available; may be null.
 
object_ptr< videovideo_
 Preview of the content as a video, if available; may be null.
 
object_ptr< videoNotevideo_note_
 Preview of the content as a video note, if available; may be null.
 
object_ptr< voiceNotevoice_note_
 Preview of the content as a voice note, if available; may be null.
 
int53 story_sender_chat_id_
 The identifier of the sender of the previewed story; 0 if none.
 
int32 story_id_
 The identifier of the previewed story; 0 if none.
 
array< object_ptr< sticker > > stickers_
 Up to 4 stickers from the sticker set available via the link.
 
int32 instant_view_version_
 Version of web page instant view (currently, can be 1 or 2); 0 if none.
 

Public Instance Methods

 webPage ()
 
 webPage (string const &url_, string const &display_url_, string const &type_, string const &site_name_, string const &title_, object_ptr< formattedText > &&description_, object_ptr< photo > &&photo_, string const &embed_url_, string const &embed_type_, int32 embed_width_, int32 embed_height_, int32 duration_, string const &author_, bool has_large_media_, bool show_large_media_, bool skip_confirmation_, bool show_above_text_, object_ptr< animation > &&animation_, object_ptr< audio > &&audio_, object_ptr< document > &&document_, object_ptr< sticker > &&sticker_, object_ptr< video > &&video_, object_ptr< videoNote > &&video_note_, object_ptr< voiceNote > &&voice_note_, int53 story_sender_chat_id_, int32 story_id_, array< object_ptr< sticker >> &&stickers_, 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 = 594900692
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ webPage() [1/2]

webPage ( )

Describes a link preview.

◆ webPage() [2/2]

webPage ( string const &  url_,
string const &  display_url_,
string const &  type_,
string const &  site_name_,
string const &  title_,
object_ptr< formattedText > &&  description_,
object_ptr< photo > &&  photo_,
string const &  embed_url_,
string const &  embed_type_,
int32  embed_width_,
int32  embed_height_,
int32  duration_,
string const &  author_,
bool  has_large_media_,
bool  show_large_media_,
bool  skip_confirmation_,
bool  show_above_text_,
object_ptr< animation > &&  animation_,
object_ptr< audio > &&  audio_,
object_ptr< document > &&  document_,
object_ptr< sticker > &&  sticker_,
object_ptr< video > &&  video_,
object_ptr< videoNote > &&  video_note_,
object_ptr< voiceNote > &&  voice_note_,
int53  story_sender_chat_id_,
int32  story_id_,
array< object_ptr< sticker >> &&  stickers_,
int32  instant_view_version_ 
)

Describes a link preview.

Parameters
[in]url_Original URL of the link.
[in]display_url_URL to display.
[in]type_Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else.
[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]photo_Image representing the content; may be null.
[in]embed_url_URL to show in the embedded preview.
[in]embed_type_MIME type of the embedded preview, (e.g., text/html or video/mp4).
[in]embed_width_Width of the embedded preview.
[in]embed_height_Height of the embedded preview.
[in]duration_Duration of the content, in seconds.
[in]author_Author of the content.
[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]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]animation_Preview of the content as an animation, if available; may be null.
[in]audio_Preview of the content as an audio file, if available; may be null.
[in]document_Preview of the content as a document, if available; may be null.
[in]sticker_Preview of the content as a sticker for small WEBP files, if available; may be null.
[in]video_Preview of the content as a video, if available; may be null.
[in]video_note_Preview of the content as a video note, if available; may be null.
[in]voice_note_Preview of the content as a voice note, if available; may be null.
[in]story_sender_chat_id_The identifier of the sender of the previewed story; 0 if none.
[in]story_id_The identifier of the previewed story; 0 if none.
[in]stickers_Up to 4 stickers from the sticker set available via the link.
[in]instant_view_version_Version of web page instant view (currently, can be 1 or 2); 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: