mirror of
https://github.com/dstotijn/go-notion.git
synced 2025-06-12 23:57:35 +02:00
Add support for template mentions in RichText values (#32)
This commit is contained in:
parent
51efbea8fd
commit
8519feef2f
18
rich_text.go
18
rich_text.go
@ -32,6 +32,7 @@ type Mention struct {
|
|||||||
Database *ID `json:"database,omitempty"`
|
Database *ID `json:"database,omitempty"`
|
||||||
Date *Date `json:"date,omitempty"`
|
Date *Date `json:"date,omitempty"`
|
||||||
LinkPreview *LinkPreview `json:"link_preview,omitempty"`
|
LinkPreview *LinkPreview `json:"link_preview,omitempty"`
|
||||||
|
TemplateMention *TemplateMention `json:"template_mention,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Date struct {
|
type Date struct {
|
||||||
@ -44,6 +45,13 @@ type LinkPreview struct {
|
|||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type TemplateMention struct {
|
||||||
|
Type TemplateMentionType `json:"type"`
|
||||||
|
|
||||||
|
TemplateMentionDate *TemplateMentionDateType `json:"template_mention_date,omitempty"`
|
||||||
|
TemplateMentionUser *TemplateMentionUserType `json:"template_mention_user,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
type Text struct {
|
type Text struct {
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
Link *Link `json:"link,omitempty"`
|
Link *Link `json:"link,omitempty"`
|
||||||
@ -60,6 +68,9 @@ type ID struct {
|
|||||||
type (
|
type (
|
||||||
RichTextType string
|
RichTextType string
|
||||||
MentionType string
|
MentionType string
|
||||||
|
TemplateMentionType string
|
||||||
|
TemplateMentionDateType string
|
||||||
|
TemplateMentionUserType string
|
||||||
Color string
|
Color string
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -75,6 +86,13 @@ const (
|
|||||||
MentionTypeDatabase MentionType = "database"
|
MentionTypeDatabase MentionType = "database"
|
||||||
MentionTypeDate MentionType = "date"
|
MentionTypeDate MentionType = "date"
|
||||||
MentionTypeLinkPreview MentionType = "link_preview"
|
MentionTypeLinkPreview MentionType = "link_preview"
|
||||||
|
MentionTypeTemplateMention MentionType = "template_mention"
|
||||||
|
|
||||||
|
TemplateMentionTypeDate TemplateMentionType = "template_mention_date"
|
||||||
|
TemplateMentionTypeUser TemplateMentionType = "template_mention_user"
|
||||||
|
TemplateMentionDateTypeToday TemplateMentionDateType = "today"
|
||||||
|
TemplateMentionDateTypeNow TemplateMentionDateType = "now"
|
||||||
|
TemplateMentionUserTypeMe TemplateMentionUserType = "me"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user