1
0
mirror of https://github.com/dstotijn/go-notion.git synced 2024-11-28 08:58:51 +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"`
Toggle *RichTextBlock `json:"toggle,omitempty"`
ChildPage *ChildPage `json:"child_page,omitempty"`
Callout *Callout `json:"callout,omitempty"`
}
type RichTextBlock struct {
@ -44,6 +45,12 @@ type ChildPage struct {
Title string `json:"title"`
}
type Callout struct {
Text []RichText `json:"text"`
Icon *Icon `json:"icon,omitempty"`
Children []Block `json:"children,omitempty"`
}
type BlockType string
const (
@ -56,6 +63,7 @@ const (
BlockTypeToDo BlockType = "to_do"
BlockTypeToggle BlockType = "toggle"
BlockTypeChildPage BlockType = "child_page"
BlockTypeCallout BlockType = "callout"
BlockTypeUnsupported BlockType = "unsupported"
)

View File

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