From fbb3f05dba41e6035e2e50c904c4a5b5c7dea7e0 Mon Sep 17 00:00:00 2001 From: KWON Date: Tue, 22 Jul 2025 15:44:45 +0900 Subject: [PATCH] =?UTF-8?q?=ED=97=A4=EB=8D=94=20=EA=B0=80=EC=A7=80?= =?UTF-8?q?=EA=B3=A0=20=EC=98=A4=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion_api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/notion_api.py b/lib/notion_api.py index f85ef5c..a95b36a 100644 --- a/lib/notion_api.py +++ b/lib/notion_api.py @@ -10,11 +10,17 @@ from datetime import datetime sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from lib.config import Config +HEADERS = { + "Authorization": f"Bearer {Config.NOTION_API_SECRET}", + "Notion-Version": Config.NOTION_VERSION, + "Content-Type": "application/json" +} + from lib.common import EVENT_TYPE_LABELS def get_page_details(page_id: str) -> Optional[Dict]: url = f"{Config.NOTION_API_BASE}/pages/{page_id}" - response = requests.get(url, headers=Config.HEADERS) + response = requests.get(url, headers=HEADERS) if response.status_code == 200: return response.json() @@ -157,7 +163,7 @@ def fetch_entity_detail(entity_type: str, entity_id: str) -> Optional[Dict]: return None try: - response = requests.get(url, headers=Config.HEADERS, timeout=5) + response = requests.get(url, headers=HEADERS, timeout=5) response.raise_for_status() return response.json() except Exception as e: