generated from padok-team/yatas-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReportDatabase.go
37 lines (35 loc) · 860 Bytes
/
ReportDatabase.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import "github.com/jomei/notionapi"
func createInlineDatabase(pageID string) DatabaseV1CreateRequest {
title := notionapi.Text{
Content: "All checks",
}
database := DatabaseV1CreateRequest{
Parent: notionapi.Parent{PageID: notionapi.PageID(pageID)},
Title: []notionapi.RichText{
{
Text: &title,
},
},
Properties: notionapi.PropertyConfigs{
"Id": notionapi.TitlePropertyConfig{
Type: "title",
Title: struct{}{},
},
"Status": notionapi.CheckboxPropertyConfig{
Type: "checkbox",
Checkbox: struct{}{},
},
"Type": notionapi.SelectPropertyConfig{
Type: "select",
Select: notionapi.Select{Options: []notionapi.Option{}},
},
"Description": notionapi.RichTextPropertyConfig{
Type: "rich_text",
RichText: struct{}{},
},
},
IsInline: true,
}
return database
}