Link Search Menu Expand Document

Constructor: webPage

Back to constructors index

Webpage preview

Attributes:

NameTypeRequiredDescription
has_large_mediaBoolOptionalWhether the size of the media in the preview can be changed.
idlongYesPreview ID
urlstringYesURL of previewed webpage
display_urlstringYesWebpage URL to be displayed to the user
hashintYes
typestringOptionalType of the web page. One of the following:

- video
- gif
- photo
- document
- profile
- telegram_background
- telegram_theme
- telegram_story
- telegram_channel
- telegram_channel_request
- telegram_megagroup
- telegram_chat
- telegram_megagroup_request
- telegram_chat_request
- telegram_album
- telegram_message
- telegram_bot
- telegram_voicechat
- telegram_livestream
- telegram_user
- telegram_botapp
- telegram_channel_boost
- telegram_group_boost
- telegram_giftcode
- telegram_stickerset

site_namestringOptionalShort name of the site (e.g., Google Docs, App Store)
titlestringOptionalTitle of the content
descriptionstringOptionalContent description
photoPhotoOptionalImage representing the content
embed_urlstringOptionalURL to show in the embedded preview
embed_typestringOptionalMIME type of the embedded preview, (e.g., text/html or video/mp4)
embed_widthintOptionalWidth of the embedded preview
embed_heightintOptionalHeight of the embedded preview
durationintOptionalDuration of the content, in seconds
authorstringOptionalAuthor of the content
documentDocumentOptionalPreview of the content as a media file
cached_pagePageOptionalPage contents in instant view format
attributesArray of WebPageAttributeOptionalWebpage attributes

Type: WebPage

Example:

$webPage = ['_' => 'webPage', 'has_large_media' => Bool, 'id' => long, 'url' => 'string', 'display_url' => 'string', 'hash' => int, 'type' => 'string', 'site_name' => 'string', 'title' => 'string', 'description' => 'string', 'photo' => Photo, 'embed_url' => 'string', 'embed_type' => 'string', 'embed_width' => int, 'embed_height' => int, 'duration' => int, 'author' => 'string', 'document' => Document, 'cached_page' => Page, 'attributes' => [WebPageAttribute, WebPageAttribute]];