1
0
mirror of https://github.com/dstotijn/go-notion.git synced 2025-07-03 00:46:49 +02:00

Add embed block type

This commit is contained in:
David Stotijn
2021-12-17 11:18:13 +01:00
parent 557c032883
commit 9051d940b1

View File

@ -28,6 +28,7 @@ type Block struct {
Callout *Callout `json:"callout,omitempty"` Callout *Callout `json:"callout,omitempty"`
Quote *RichTextBlock `json:"quote,omitempty"` Quote *RichTextBlock `json:"quote,omitempty"`
Code *Code `json:"code,omitempty"` Code *Code `json:"code,omitempty"`
Embed *Embed `json:"embed,omitempty"`
} }
type RichTextBlock struct { type RichTextBlock struct {
@ -62,6 +63,10 @@ type Code struct {
Language *string `json:"language,omitempty"` Language *string `json:"language,omitempty"`
} }
type Embed struct {
URL string `json:"url"`
}
type BlockType string type BlockType string
const ( const (
@ -78,6 +83,7 @@ const (
BlockTypeCallout BlockType = "callout" BlockTypeCallout BlockType = "callout"
BlockTypeQuote BlockType = "quote" BlockTypeQuote BlockType = "quote"
BlockTypeCode BlockType = "code" BlockTypeCode BlockType = "code"
BlockTypeEmbed BlockType = "embed"
BlockTypeUnsupported BlockType = "unsupported" BlockTypeUnsupported BlockType = "unsupported"
) )