-
Original URL of the link
Declaration
Swift
public let url: String
-
URL to display
Declaration
Swift
public let displayUrl: String
-
Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else
Declaration
Swift
public let type: String
-
Short name of the site (e.g., Google Docs, App Store)
Declaration
Swift
public let siteName: String
-
Title of the content
Declaration
Swift
public let title: String
-
Description of the content
Declaration
Swift
public let description: String
-
Image representing the content; may be null
Declaration
Swift
public let photo: Photo?
-
URL to show in the embedded preview
Declaration
Swift
public let embedUrl: String
-
MIME type of the embedded preview, (e.g., text/html or video/mp4)
Declaration
Swift
public let embedType: String
-
Width of the embedded preview
Declaration
Swift
public let embedWidth: Int32
-
Height of the embedded preview
Declaration
Swift
public let embedHeight: Int32
-
Duration of the content, in seconds
Declaration
Swift
public let duration: Int32
-
Author of the content
Declaration
Swift
public let author: String
-
Preview of the content as an animation, if available; may be null
Declaration
Swift
public let animation: Animation?
-
Preview of the content as an audio file, if available; may be null
Declaration
Swift
public let audio: Audio?
-
Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null
Declaration
Swift
public let document: Document?
-
Preview of the content as a sticker for small WEBP files, if available; may be null
Declaration
Swift
public let sticker: Sticker?
-
Preview of the content as a video, if available; may be null
Declaration
Swift
public let video: Video?
-
Preview of the content as a video note, if available; may be null
Declaration
Swift
public let videoNote: VideoNote?
-
Preview of the content as a voice note, if available; may be null
Declaration
Swift
public let voiceNote: VoiceNote?
-
Version of instant view, available for the web page (currently can be 1 or 2), 0 if none
Declaration
Swift
public let instantViewVersion: Int32
-
init(url:displayUrl:type:siteName:title:description:photo:embedUrl:embedType:embedWidth:embedHeight:duration:author:animation:audio:document:sticker:video:videoNote:voiceNote:instantViewVersion:)
Describes a web page preview
Declaration
Swift
public init(url: String, displayUrl: String, type: String, siteName: String, title: String, description: String, photo: Photo?, embedUrl: String, embedType: String, embedWidth: Int32, embedHeight: Int32, duration: Int32, author: String, animation: Animation?, audio: Audio?, document: Document?, sticker: Sticker?, video: Video?, videoNote: VideoNote?, voiceNote: VoiceNote?, instantViewVersion: Int32)
Parameters
url
Original URL of the link
displayUrl
URL to display
type
Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else
siteName
Short name of the site (e.g., Google Docs, App Store)
title
Title of the content
description
Description of the content
photo
Image representing the content; may be null
embedUrl
URL to show in the embedded preview
embedType
MIME type of the embedded preview, (e.g., text/html or video/mp4)
embedWidth
Width of the embedded preview
embedHeight
Height of the embedded preview
duration
Duration of the content, in seconds
author
Author of the content
animation
Preview of the content as an animation, if available; may be null
audio
Preview of the content as an audio file, if available; may be null
document
Preview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null
sticker
Preview of the content as a sticker for small WEBP files, if available; may be null
video
Preview of the content as a video, if available; may be null
videoNote
Preview of the content as a video note, if available; may be null
voiceNote
Preview of the content as a voice note, if available; may be null
instantViewVersion
Version of instant view, available for the web page (currently can be 1 or 2), 0 if none