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. Can be: article, photo, audio, video, document, profile, app, or something else
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]];