Layer 227
WebPageObj
Webpage preview
constructor
webPage#e89c45b2 flags:# has_large_media:flags.13?true video_cover_photo:flags.14?true id:long url:string display_url:string hash:int type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document cached_page:flags.10?Page attributes:flags.12?Vector<WebPageAttribute> = WebPage;
Parameters
| Name | Type | Description |
|---|---|---|
| HasLargeMedia | flags .13? true | Whether the size of the media in the preview can be changed. |
| VideoCoverPhoto | flags .14? true | Represents a custom video cover. |
| Id | long | Preview ID |
| Url | string | URL of previewed webpage |
| DisplayUrl | string | Webpage URL to be displayed to the user |
| Hash | int | Hash used for caching, for more info click here |
| Type | flags .0? string | Type of the web page, which influences how the preview is rendered (i. e. which extra action button is offered, where the media is taken from, and which Web Page Attribute is present in the attributes field). See above for the list of possible values. |
| SiteName | flags .1? string | Short name of the site (e. g., Google Docs, App Store) |
| Title | flags .2? string | Title of the content |
| Description | flags .3? string | Content description |
| Photo | flags .4? Photo | Image representing the content |
| EmbedUrl | flags .5? string | URL to show in the embedded preview |
| EmbedType | flags .5? string | MIME type of the embedded preview, (e. g., text/html or video/mp 4) |
| EmbedWidth | flags .6? int | Width of the embedded preview |
| EmbedHeight | flags .6? int | Height of the embedded preview |
| Duration | flags .7? int | Duration of the content, in seconds |
| Author | flags .8? string | Author of the content |
| Document | flags .9? Document | Preview of the content as a media file |
| CachedPage | flags .10? Page | Page contents in instant view format |
| Attributes | flags .12? Vector < WebPageAttribute > | Webpage attributes |
Returns
WebPageGogram Example
// Creating WebPageObj constructor obj := &tg.WebPageObj{ HasLargeMedia: nil, VideoCoverPhoto: nil, Id: int64(1234567890), Url: "Hello, World!", DisplayUrl: "Hello, World!", Hash: 42, // ... more required fields }