From 9051d940b1dd724a1075f124ae2db86811df08f6 Mon Sep 17 00:00:00 2001 From: David Stotijn Date: Fri, 17 Dec 2021 11:18:13 +0100 Subject: [PATCH] Add `embed` block type --- block.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/block.go b/block.go index 8ebd5a3..69a1918 100644 --- a/block.go +++ b/block.go @@ -28,6 +28,7 @@ type Block struct { Callout *Callout `json:"callout,omitempty"` Quote *RichTextBlock `json:"quote,omitempty"` Code *Code `json:"code,omitempty"` + Embed *Embed `json:"embed,omitempty"` } type RichTextBlock struct { @@ -62,6 +63,10 @@ type Code struct { Language *string `json:"language,omitempty"` } +type Embed struct { + URL string `json:"url"` +} + type BlockType string const ( @@ -78,6 +83,7 @@ const ( BlockTypeCallout BlockType = "callout" BlockTypeQuote BlockType = "quote" BlockTypeCode BlockType = "code" + BlockTypeEmbed BlockType = "embed" BlockTypeUnsupported BlockType = "unsupported" )