-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage_create.py
More file actions
33 lines (28 loc) · 788 Bytes
/
Copy pathpage_create.py
File metadata and controls
33 lines (28 loc) · 788 Bytes
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
from potion import Request, NotionHeader
from potion.api import *
from potion.objects import *
token = ''
nh = NotionHeader(authorization=token)
req = Request(nh.headers)
properties = Properties(
prop.Title('Name',
rich_text=[
{
"text": {
"content": "Tuscan Kale"
}
}
]
),
prop.Number('Price', 2.5),
prop.MultiSelect('Args', [
prop.MultiSelectOption(name='A'),
prop.MultiSelectOption(name='B'),
])
)
data = Page(parent=Parent.DataBaseParent('7d39de23304d484ea079a35f816ae68f'),
properties=properties
)
print(data)
print(req.post(page_create(),
data=data))