1
0
mirror of https://github.com/dstotijn/go-notion.git synced 2025-11-27 22:18:23 +02:00

Add table_of_contents, breadcrumb and column (list) block types

This commit is contained in:
David Stotijn
2021-12-17 13:05:55 +01:00
parent 876532e02f
commit 1ee9d231ed

View File

@@ -36,6 +36,10 @@ type Block struct {
Bookmark *Bookmark `json:"bookmark,omitempty"`
Equation *Equation `json:"equation,omitempty"`
Divider *Divider `json:"divider,omitempty"`
TableOfContents *TableOfContents `json:"table_of_contents,omitempty"`
Breadcrumb *Breadcrumb `json:"breadcrumb,omitempty"`
ColumnList *ColumnList `json:"column_list,omitempty"`
Column *Column `json:"column,omitempty"`
}
type RichTextBlock struct {
@@ -103,7 +107,19 @@ type Bookmark struct {
Caption []RichText `json:"caption,omitempty"`
}
type Divider struct{}
type ColumnList struct {
Children []Block `json:"children,omitempty"`
}
type Column struct {
Children []Block `json:"children,omitempty"`
}
type (
Divider struct{}
TableOfContents struct{}
Breadcrumb struct{}
)
type BlockType string
@@ -129,6 +145,10 @@ const (
BlockTypeBookmark BlockType = "bookmark"
BlockTypeEquation BlockType = "equation"
BlockTypeDivider BlockType = "divider"
BlockTypeTableOfContents BlockType = "table_of_contents"
BlockTypeBreadCrumb BlockType = "breadcrumb"
BlockTypeColumnList BlockType = "column_list"
BlockTypeColumn BlockType = "column"
BlockTypeUnsupported BlockType = "unsupported"
)