mirror of
https://github.com/dstotijn/go-notion.git
synced 2025-06-06 23:36:14 +02:00
Add callout
block type
This commit is contained in:
parent
a0926892c2
commit
a45f658ecc
8
block.go
8
block.go
@ -24,6 +24,7 @@ type Block struct {
|
|||||||
ToDo *ToDo `json:"to_do,omitempty"`
|
ToDo *ToDo `json:"to_do,omitempty"`
|
||||||
Toggle *RichTextBlock `json:"toggle,omitempty"`
|
Toggle *RichTextBlock `json:"toggle,omitempty"`
|
||||||
ChildPage *ChildPage `json:"child_page,omitempty"`
|
ChildPage *ChildPage `json:"child_page,omitempty"`
|
||||||
|
Callout *Callout `json:"callout,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RichTextBlock struct {
|
type RichTextBlock struct {
|
||||||
@ -44,6 +45,12 @@ type ChildPage struct {
|
|||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Callout struct {
|
||||||
|
Text []RichText `json:"text"`
|
||||||
|
Icon *Icon `json:"icon,omitempty"`
|
||||||
|
Children []Block `json:"children,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
type BlockType string
|
type BlockType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -56,6 +63,7 @@ const (
|
|||||||
BlockTypeToDo BlockType = "to_do"
|
BlockTypeToDo BlockType = "to_do"
|
||||||
BlockTypeToggle BlockType = "toggle"
|
BlockTypeToggle BlockType = "toggle"
|
||||||
BlockTypeChildPage BlockType = "child_page"
|
BlockTypeChildPage BlockType = "child_page"
|
||||||
|
BlockTypeCallout BlockType = "callout"
|
||||||
BlockTypeUnsupported BlockType = "unsupported"
|
BlockTypeUnsupported BlockType = "unsupported"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user