From cb4530c1ba23a9bb5160c77c7ca35aaa0eceee1d Mon Sep 17 00:00:00 2001 From: Kai Folf Date: Thu, 13 Mar 2025 11:11:09 +0700 Subject: [PATCH] docs: add API structure --- src/app/api/README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/app/api/README.md diff --git a/src/app/api/README.md b/src/app/api/README.md new file mode 100644 index 0000000..b77347c --- /dev/null +++ b/src/app/api/README.md @@ -0,0 +1,30 @@ +# Todoist API + +## Create Task +POST /api/task + +## Read Task +GET /api/task -> List all task +GET /api/task/[taskId] -> Get specific task + +## Update Task +PATCH /api/task/[taskId] + +## Delete Task +DELETE /api/task/[taskId] + +## Task Structure +*Subject to change* + +```js +{ + taskId: number, + userId: string, + title: string, + description: string, + dueDate: Date, + createdAt: Date, + modifiedAt: Date, + markedAsDone: boolean, +} +```