From e533c132b9ac71e8f276a90c3670285e5b079f98 Mon Sep 17 00:00:00 2001 From: Clement Fleuriot <32461248+cl-fl@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:10:49 +0000 Subject: [PATCH] Adding `is_inline` param to `create_database` function Allows to select whether the newly created database should display inline of parent page or not (defaults to False) --- notion_database/database.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/notion_database/database.py b/notion_database/database.py index a9aace7..0973b72 100644 --- a/notion_database/database.py +++ b/notion_database/database.py @@ -99,7 +99,7 @@ def list_databases(self, page_size:int =100): self.result = self.request.call_api_get(url) def create_database(self, page_id: str, title:str, - properties: Properties = None, cover: Cover = None, icon: Icon = None): + properties: Properties = None, cover: Cover = None, icon: Icon = None, is_inline: bool = False): """ Create a database @@ -108,6 +108,7 @@ def create_database(self, page_id: str, title:str, :param properties: Property schema of database :param cover: :param icon: + :param is_inline: Shows the database inline of the parent page :return: """ if properties is None: @@ -117,6 +118,7 @@ def create_database(self, page_id: str, title:str, "type": "page_id", "page_id": page_id }, + "is_inline": is_inline, "title": [ { "type": "text",