1
0
mirror of https://github.com/dstotijn/go-notion.git synced 2025-06-23 00:30:41 +02:00

Add created_by and last_edited_by support, add archived for DB ()

This commit is contained in:
David Stotijn
2022-08-13 19:46:00 +02:00
committed by GitHub
parent 264ec2c28f
commit 1320ab0ee0
5 changed files with 120 additions and 17 deletions

@ -28,8 +28,15 @@ type BotOwner struct {
User *User `json:"user"`
}
// BaseUser contains the fields that are always returned for user objects.
// See: https://developers.notion.com/reference/user#where-user-objects-appear-in-the-api
type BaseUser struct {
ID string `json:"id"`
}
type User struct {
ID string `json:"id"`
BaseUser
Type UserType `json:"type"`
Name string `json:"name"`
AvatarURL string `json:"avatar_url"`