1
0
mirror of https://github.com/dstotijn/go-notion.git synced 2025-06-15 00:05:04 +02:00

Add cover support, improve icon support

This commit is contained in:
David Stotijn
2021-12-20 19:54:19 +01:00
parent 2bfbe21a0d
commit a2507e3ec1
5 changed files with 301 additions and 10 deletions

View File

@ -6,6 +6,7 @@ type IconType string
const (
IconTypeEmoji IconType = "emoji"
IconTypeFile IconType = "file"
IconTypeExternal IconType = "external"
)
@ -15,9 +16,15 @@ type Icon struct {
Type IconType `json:"type"`
Emoji *string `json:"emoji,omitempty"`
File *IconFile `json:"file,omitempty"`
External *IconExternal `json:"external,omitempty"`
}
type IconFile struct {
URL string `json:"url"`
ExpiryTime DateTime `json:"expiry_time"`
}
type IconExternal struct {
URL string `json:"url"`
}