mirror of
https://github.com/dstotijn/go-notion.git
synced 2025-06-15 00:05:04 +02:00
Add "Retrieve your token's bot user" endpoint
This commit is contained in:
32
user.go
32
user.go
@ -1,16 +1,38 @@
|
||||
package notion
|
||||
|
||||
type UserType string
|
||||
|
||||
const (
|
||||
UserTypePerson UserType = "person"
|
||||
UserTypeBot UserType = "bot"
|
||||
)
|
||||
|
||||
type Person struct {
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
type Bot struct{}
|
||||
type Bot struct {
|
||||
Owner BotOwner `json:"owner"`
|
||||
}
|
||||
|
||||
type BotOwnerType string
|
||||
|
||||
const (
|
||||
BotOwnerTypeWorkspace BotOwnerType = "workspace"
|
||||
BotOwnerTypeUser BotOwnerType = "user"
|
||||
)
|
||||
|
||||
type BotOwner struct {
|
||||
Type BotOwnerType `json:"type"`
|
||||
Workspace bool `json:"workspace"`
|
||||
User *User `json:"user"`
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID string `json:"id"`
|
||||
Type string `json:"type"`
|
||||
Name string `json:"name"`
|
||||
AvatarURL *string `json:"avatar_url"`
|
||||
ID string `json:"id"`
|
||||
Type UserType `json:"type"`
|
||||
Name string `json:"name"`
|
||||
AvatarURL string `json:"avatar_url"`
|
||||
|
||||
Person *Person `json:"person"`
|
||||
Bot *Bot `json:"bot"`
|
||||
|
Reference in New Issue
Block a user