PageBlock
public indirect enum PageBlock : Codable, Equatable, FunctionResult, TDEnum, EquatableEnum
Describes a block of an instant view web page
-
The title of a page
- title: Title
Declaration
Swift
case title(title: RichText)
-
The subtitle of a page
- subtitle: Subtitle
Declaration
Swift
case subtitle(subtitle: RichText)
-
The author and publishing date of a page
- publishDate: Point in time (Unix timestamp) when the article was published; 0 if unknown
Declaration
Swift
case authorDate(author: RichText, publishDate: Int32)
-
A header
- header: Header
Declaration
Swift
case header(header: RichText)
-
A subheader
- subheader: Subheader
Declaration
Swift
case subheader(subheader: RichText)
-
A kicker
- kicker: Kicker
Declaration
Swift
case kicker(kicker: RichText)
-
A text paragraph
- text: Paragraph text
Declaration
Swift
case paragraph(text: RichText)
-
A preformatted text paragraph
- text: Paragraph text
- language: Programming language for which the text should be formatted
Declaration
Swift
case preformatted(text: RichText, language: String)
-
The footer of a page
- footer: Footer
Declaration
Swift
case footer(footer: RichText)
-
An empty block separating a page
Declaration
Swift
case divider
-
An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor
- name: Name of the anchor
Declaration
Swift
case anchor(name: String)
-
A list of data blocks
- items: The items of the list
Declaration
Swift
case list(items: [PageBlockListItem])
-
A block quote
- text: Quote text
- credit: Quote credit
-
A pull quote
- text: Quote text
- credit: Quote credit
-
An animation
- animation: Animation file; may be null
- caption: Animation caption
- needAutoplay: True, if the animation should be played automatically
Declaration
Swift
case animation(animation: Animation?, caption: PageBlockCaption, needAutoplay: Bool)
-
An audio file
- audio: Audio file; may be null
- caption: Audio file caption
Declaration
Swift
case audio(audio: Audio?, caption: PageBlockCaption)
-
A photo
- photo: Photo file; may be null
- caption: Photo caption
- url: URL that needs to be opened when the photo is clicked
Declaration
Swift
case photo(photo: Photo?, caption: PageBlockCaption, url: String)
-
A video
- video: Video file; may be null
- caption: Video caption
- needAutoplay: True, if the video should be played automatically
- isLooped: True, if the video should be looped
Declaration
Swift
case video(video: Video?, caption: PageBlockCaption, needAutoplay: Bool, isLooped: Bool)
-
A voice note
- voiceNote: Voice note; may be null
- caption: Voice note caption
Declaration
Swift
case voiceNote(voiceNote: VoiceNote?, caption: PageBlockCaption)
-
A page cover
- cover: Cover
Declaration
Swift
case cover(cover: PageBlock)
-
An embedded web page
- url: Web page URL, if available
- html: HTML-markup of the embedded page
- posterPhoto: Poster photo, if available; may be null
- width: Block width; 0 if unknown
- height: Block height; 0 if unknown
- caption: Block caption
- isFullWidth: True, if the block should be full width
- allowScrolling: True, if scrolling should be allowed
Declaration
Swift
case embedded(url: String, html: String, posterPhoto: Photo?, width: Int32, height: Int32, caption: PageBlockCaption, isFullWidth: Bool, allowScrolling: Bool)
-
An embedded post
- url: Web page URL
- authorPhoto: Post author photo; may be null
Date
Point in time (Unix timestamp) when the post was created; 0 if unknown- pageBlocks: Post content
- caption: Post caption
Declaration
Swift
case embeddedPost(url: String, author: String, authorPhoto: Photo?, date: Int32, pageBlocks: [PageBlock], caption: PageBlockCaption)
-
A collage
- pageBlocks: Collage item contents
- caption: Block caption
Declaration
Swift
case collage(pageBlocks: [PageBlock], caption: PageBlockCaption)
-
A slideshow
- pageBlocks: Slideshow item contents
- caption: Block caption
Declaration
Swift
case slideshow(pageBlocks: [PageBlock], caption: PageBlockCaption)
-
A link to a chat
- title: Chat title
- photo: Chat photo; may be null
- username: Chat username, by which all other information about the chat should be resolved
Declaration
Swift
case chatLink(title: String, photo: ChatPhoto?, username: String)
-
A table
- caption: Table caption
- cells: Table cells
- isBordered: True, if the table is bordered
- isStriped: True, if the table is striped
Declaration
Swift
case table(caption: RichText, cells: [[PageBlockTableCell]], isBordered: Bool, isStriped: Bool)
-
A collapsible block
- header: Always visible heading for the block
- pageBlocks: Block contents
- isOpen: True, if the block is open by default
Declaration
Swift
case details(header: RichText, pageBlocks: [PageBlock], isOpen: Bool)
-
Related articles
- header: Block header
- articles: List of related articles
Declaration
Swift
case relatedArticles(header: RichText, articles: [PageBlockRelatedArticle])
-
A map
- location: Location of the map center
- zoom: Map zoom level
- width: Map width
- height: Map height
- caption: Block caption
Declaration
Swift
case map(location: Location, zoom: Int32, width: Int32, height: Int32, caption: PageBlockCaption)