1
0
mirror of https://github.com/dstotijn/go-notion.git synced 2025-06-06 23:36:14 +02:00

Add quote block type, simplify callout block type

This commit is contained in:
David Stotijn 2021-12-16 11:54:23 +01:00
parent a45f658ecc
commit 0060b295c2

View File

@ -25,6 +25,7 @@ type Block struct {
Toggle *RichTextBlock `json:"toggle,omitempty"`
ChildPage *ChildPage `json:"child_page,omitempty"`
Callout *Callout `json:"callout,omitempty"`
Quote *RichTextBlock `json:"quote,omitempty"`
}
type RichTextBlock struct {
@ -46,9 +47,8 @@ type ChildPage struct {
}
type Callout struct {
Text []RichText `json:"text"`
Icon *Icon `json:"icon,omitempty"`
Children []Block `json:"children,omitempty"`
RichTextBlock
Icon *Icon `json:"icon,omitempty"`
}
type BlockType string
@ -64,6 +64,7 @@ const (
BlockTypeToggle BlockType = "toggle"
BlockTypeChildPage BlockType = "child_page"
BlockTypeCallout BlockType = "callout"
BlockTypeQuote BlockType = "quote"
BlockTypeUnsupported BlockType = "unsupported"
)