-
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
urlOriginal URL of the link
displayUrlURL to display
typeType of the web page. Can be: article, photo, audio, video, document, profile, app, or something else
siteNameShort name of the site (e.g., Google Docs, App Store)
titleTitle of the content
descriptionDescription of the content
photoImage representing the content; may be null
embedUrlURL to show in the embedded preview
embedTypeMIME type of the embedded preview, (e.g., text/html or video/mp4)
embedWidthWidth of the embedded preview
embedHeightHeight of the embedded preview
durationDuration of the content, in seconds
authorAuthor of the content
animationPreview of the content as an animation, if available; may be null
audioPreview of the content as an audio file, if available; may be null
documentPreview of the content as a document, if available (currently only available for small PDF files and ZIP archives); may be null
stickerPreview of the content as a sticker for small WEBP files, if available; may be null
videoPreview of the content as a video, if available; may be null
videoNotePreview of the content as a video note, if available; may be null
voiceNotePreview of the content as a voice note, if available; may be null
instantViewVersionVersion of instant view, available for the web page (currently can be 1 or 2), 0 if none
View on GitHub
Install in Dash
WebPage Structure Reference