MadelineProtoDocs/old_docs/API_docs_v86/constructors/webPage.md
2019-12-27 17:48:04 +01:00

2.7 KiB

title description image
webPage Webpage preview https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: webPage

Back to constructors index

Webpage preview

Attributes:

Name Type Required Description
id long Yes Preview ID
url string Yes URL of previewed webpage
display_url string Yes Webpage URL to be displayed to the user
hash int Yes Hash for pagination, for more info click here
type string Optional Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else
site_name string Optional Short name of the site (e.g., Google Docs, App Store)
title string Optional Title of the content
description string Optional Content description
photo Photo Optional Image representing the content
embed_url string Optional URL to show in the embedded preview
embed_type string Optional MIME type of the embedded preview, (e.g., text/html or video/mp4)
embed_width int Optional Width of the embedded preview
embed_height int Optional Height of the embedded preview
duration int Optional Duration of the content, in seconds
author string Optional Author of the content
document Document Optional Preview of the content as a media file
cached_page Page Optional Page contents in instant view format

Type: WebPage

Example:

$webPage = ['_' => 'webPage', '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];

Or, if you're into Lua:

webPage={_='webPage', 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}