mirror of
https://github.com/dstotijn/go-notion.git
synced 2025-06-08 23:46:12 +02:00
Add quote block type, simplify callout block type
This commit is contained in:
parent
a45f658ecc
commit
0060b295c2
7
block.go
7
block.go
@ -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"
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user