mirror of
https://github.com/dstotijn/go-notion.git
synced 2025-07-03 00:46:49 +02:00
Add embed
block type
This commit is contained in:
6
block.go
6
block.go
@ -28,6 +28,7 @@ type Block struct {
|
|||||||
Callout *Callout `json:"callout,omitempty"`
|
Callout *Callout `json:"callout,omitempty"`
|
||||||
Quote *RichTextBlock `json:"quote,omitempty"`
|
Quote *RichTextBlock `json:"quote,omitempty"`
|
||||||
Code *Code `json:"code,omitempty"`
|
Code *Code `json:"code,omitempty"`
|
||||||
|
Embed *Embed `json:"embed,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type RichTextBlock struct {
|
type RichTextBlock struct {
|
||||||
@ -62,6 +63,10 @@ type Code struct {
|
|||||||
Language *string `json:"language,omitempty"`
|
Language *string `json:"language,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Embed struct {
|
||||||
|
URL string `json:"url"`
|
||||||
|
}
|
||||||
|
|
||||||
type BlockType string
|
type BlockType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -78,6 +83,7 @@ const (
|
|||||||
BlockTypeCallout BlockType = "callout"
|
BlockTypeCallout BlockType = "callout"
|
||||||
BlockTypeQuote BlockType = "quote"
|
BlockTypeQuote BlockType = "quote"
|
||||||
BlockTypeCode BlockType = "code"
|
BlockTypeCode BlockType = "code"
|
||||||
|
BlockTypeEmbed BlockType = "embed"
|
||||||
BlockTypeUnsupported BlockType = "unsupported"
|
BlockTypeUnsupported BlockType = "unsupported"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user