1
0
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:
David Stotijn 2021-12-13 11:42:03 +01:00
parent a0926892c2
commit a45f658ecc
2 changed files with 9 additions and 1 deletions

View File

@ -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"
) )

View File

@ -13,7 +13,7 @@ import (
const ( const (
baseURL = "https://api.notion.com/v1" baseURL = "https://api.notion.com/v1"
apiVersion = "2021-05-13" apiVersion = "2021-08-16"
clientVersion = "0.0.0" clientVersion = "0.0.0"
) )