mirror of
https://github.com/dstotijn/go-notion.git
synced 2025-06-06 23:36:14 +02:00
Add synced_block
block type
This commit is contained in:
parent
6b75ac5688
commit
c4783f697b
16
block.go
16
block.go
@ -42,6 +42,7 @@ type Block struct {
|
|||||||
Column *Column `json:"column,omitempty"`
|
Column *Column `json:"column,omitempty"`
|
||||||
LinkPreview *LinkPreview `json:"link_preview,omitempty"`
|
LinkPreview *LinkPreview `json:"link_preview,omitempty"`
|
||||||
LinkToPage *LinkToPage `json:"link_to_page,omitempty"`
|
LinkToPage *LinkToPage `json:"link_to_page,omitempty"`
|
||||||
|
SyncedBlock *SyncedBlock `json:"synced_block,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RichTextBlock struct {
|
type RichTextBlock struct {
|
||||||
@ -131,6 +132,20 @@ const (
|
|||||||
LinkToPageTypeDatabaseID LinkToPageType = "database_id"
|
LinkToPageTypeDatabaseID LinkToPageType = "database_id"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type SyncedBlock struct {
|
||||||
|
SyncedFrom *SyncedFrom `json:"synced_from"`
|
||||||
|
Children []Block `json:"children,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SyncedFrom struct {
|
||||||
|
Type SyncedFromType `json:"type"`
|
||||||
|
BlockID string `json:"block_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type SyncedFromType string
|
||||||
|
|
||||||
|
const SyncedFromTypeBlockID SyncedFromType = "block_id"
|
||||||
|
|
||||||
type (
|
type (
|
||||||
Divider struct{}
|
Divider struct{}
|
||||||
TableOfContents struct{}
|
TableOfContents struct{}
|
||||||
@ -167,6 +182,7 @@ const (
|
|||||||
BlockTypeColumn BlockType = "column"
|
BlockTypeColumn BlockType = "column"
|
||||||
BlockTypeLinkPreview BlockType = "link_preview"
|
BlockTypeLinkPreview BlockType = "link_preview"
|
||||||
BlockTypeLinkToPage BlockType = "link_to_page"
|
BlockTypeLinkToPage BlockType = "link_to_page"
|
||||||
|
BlockTypeSyncedBlock BlockType = "synced_block"
|
||||||
BlockTypeUnsupported BlockType = "unsupported"
|
BlockTypeUnsupported BlockType = "unsupported"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user