mirror of
https://github.com/dstotijn/go-notion.git
synced 2025-06-06 23:36:14 +02:00
Add is_toggleable
behavior to heading_{1,2,3}
block types (#41)
This commit is contained in:
parent
e399b8957d
commit
1b585c661f
21
block.go
21
block.go
@ -242,9 +242,10 @@ func (b TemplateBlock) MarshalJSON() ([]byte, error) {
|
||||
type Heading1Block struct {
|
||||
baseBlock
|
||||
|
||||
RichText []RichText `json:"rich_text"`
|
||||
Children []Block `json:"children,omitempty"`
|
||||
Color Color `json:"color,omitempty"`
|
||||
RichText []RichText `json:"rich_text"`
|
||||
Children []Block `json:"children,omitempty"`
|
||||
Color Color `json:"color,omitempty"`
|
||||
IsToggleable bool `json:"is_toggleable"`
|
||||
}
|
||||
|
||||
// MarshalJSON implements json.Marshaler.
|
||||
@ -264,9 +265,10 @@ func (b Heading1Block) MarshalJSON() ([]byte, error) {
|
||||
type Heading2Block struct {
|
||||
baseBlock
|
||||
|
||||
RichText []RichText `json:"rich_text"`
|
||||
Children []Block `json:"children,omitempty"`
|
||||
Color Color `json:"color,omitempty"`
|
||||
RichText []RichText `json:"rich_text"`
|
||||
Children []Block `json:"children,omitempty"`
|
||||
Color Color `json:"color,omitempty"`
|
||||
IsToggleable bool `json:"is_toggleable"`
|
||||
}
|
||||
|
||||
// MarshalJSON implements json.Marshaler.
|
||||
@ -286,9 +288,10 @@ func (b Heading2Block) MarshalJSON() ([]byte, error) {
|
||||
type Heading3Block struct {
|
||||
baseBlock
|
||||
|
||||
RichText []RichText `json:"rich_text"`
|
||||
Children []Block `json:"children,omitempty"`
|
||||
Color Color `json:"color,omitempty"`
|
||||
RichText []RichText `json:"rich_text"`
|
||||
Children []Block `json:"children,omitempty"`
|
||||
Color Color `json:"color,omitempty"`
|
||||
IsToggleable bool `json:"is_toggleable"`
|
||||
}
|
||||
|
||||
// MarshalJSON implements json.Marshaler.
|
||||
|
Loading…
x
Reference in New Issue
Block a user