{"id":25488166,"url":"https://github.com/chisa-dev/todo_app_api","last_synced_at":"2026-04-10T21:04:54.156Z","repository":{"id":189674648,"uuid":"681071397","full_name":"chisa-dev/todo_app_api","owner":"chisa-dev","description":"Simple API for TODO Mobile Application development ","archived":false,"fork":false,"pushed_at":"2023-08-21T08:10:26.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T22:37:00.683Z","etag":null,"topics":["api","flutter","node"],"latest_commit_sha":null,"homepage":"https://a2sv-todo-app.onrender.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chisa-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-21T07:45:26.000Z","updated_at":"2023-08-21T08:37:26.000Z","dependencies_parsed_at":"2023-09-11T07:30:09.054Z","dependency_job_id":null,"html_url":"https://github.com/chisa-dev/todo_app_api","commit_stats":null,"previous_names":["gemechis-elias/todo_app_api","chisa-dev/todo_app_api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chisa-dev%2Ftodo_app_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chisa-dev%2Ftodo_app_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chisa-dev%2Ftodo_app_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chisa-dev%2Ftodo_app_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chisa-dev","download_url":"https://codeload.github.com/chisa-dev/todo_app_api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239550320,"owners_count":19657540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","flutter","node"],"created_at":"2025-02-18T20:49:55.418Z","updated_at":"2025-11-08T06:30:30.798Z","avatar_url":"https://github.com/chisa-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Todo Application\n\nGiven an `app.js` file and database file `todoApplication.db` with a table `todo`.\n\nWrite APIs to perform operations on the table `todo`, with the following columns,\n\n**Todo Table**\n\n| Column   | Type    |\n| -------- | ------- |\n| id       | INTEGER |\n| todo     | TEXT    |\n| category | TEXT    |\n| priority | TEXT    |\n| status   | TEXT    |\n| due_date | DATE    |\n\n\u003cMultiLineNote\u003e\n  \n  - Replace the spaces in URL with `%20`.\n  - Possible values for `priority` are `HIGH`, `MEDIUM`, and `LOW`.\n  - Possible values for `status` are `TO DO`, `IN PROGRESS`, and `DONE`.\n  - Possible values for `category` are `WORK`, `HOME`, and `LEARNING`.\n  - Use the format `yyyy-MM-dd` for formating with date-fns `format` function.\n    - The user may request with due date value as `2021-1-21`, format the date to `2021-01-21` and perform Create, Read, Update operations on the database.\n\u003c/MultiLineNote\u003e\n\n\u003cMultiLineQuickTip\u003e\n\nUse `date-fns` format function to format the date. Refer to the documentation [link](https://date-fns.org/v2.19.0/docs/Getting-Started) for the usage of `format` function.\n\u003c/MultiLineQuickTip\u003e\n\n### Invalid scenarios for all APIs\n\n- **Invalid Status**\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Body**\n      ```\n      Invalid Todo Status\n      ```\n- **Invalid Priority**\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Body**\n      ```\n      Invalid Todo Priority\n      ```\n- **Invalid Category**\n\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Body**\n      ```\n      Invalid Todo Category\n      ```\n\n- **Invalid Due Date**\n  - **Response**\n    - **Status code**\n      ```\n      400\n      ```\n    - **Body**\n      ```\n      Invalid Due Date\n      ```\n\n### API 1\n\n#### Path: `/todos/`\n\n#### Method: `GET`\n\n- **Scenario 1**\n\n  - **Sample API**\n    ```\n    /todos/?status=TO%20DO\n    ```\n  - **Description**:\n\n    Returns a list of all todos whose status is 'TO DO'\n\n  - **Response**\n\n    ```\n    [\n      {\n        \"id\": 2,\n        \"todo\": \"Buy a Car\",\n        \"priority\": \"Medium\",\n        \"category\": \"WORK\",\n        \"status\": \"TO DO\",\n        \"dueDate\": \"2021-09-22\"\n      },\n      ...\n    ]\n    ```\n\n- **Scenario 2**\n\n  - **Sample API**\n    ```\n    /todos/?priority=HIGH\n    ```\n  - **Description**:\n\n    Returns a list of all todos whose priority is 'HIGH'\n\n  - **Response**\n\n    ```\n    [\n      {\n        \"id\": 1,\n        \"todo\": \"Learn Node JS\",\n        \"priority\": \"HIGH\",\n        \"status\": \"IN PROGRESS\",\n        \"category\": \"LEARNING\",\n        \"status\": \"IN PROGRESS\",\n        \"dueDate\": \"2021-04-04\"\n      }\n    ]\n    ```\n\n- **Scenario 3**\n\n  - **Sample API**\n    ```\n    /todos/?priority=HIGH\u0026status=IN%20PROGRESS\n    ```\n  - **Description**:\n\n    Returns a list of all todos whose priority is 'HIGH' and status is 'IN PROGRESS'\n\n  - **Response**\n\n    ```\n    [\n      {\n        \"id\": 2,\n        \"todo\": \"Learn Node JS\",\n        \"priority\": \"HIGH\",\n        \"category\": \"LEARNING\",\n        \"status\": \"IN PROGRESS\",\n        \"dueDate\": \"2021-02-22\"\n      },\n      ...\n    ]\n    ```\n\n- **Scenario 4**\n\n  - **Sample API**\n    ```\n    /todos/?search_q=Buy\n    ```\n  - **Description**:\n\n    Returns a list of all todos whose todo contains 'Buy' text\n\n  - **Response**\n\n    ```\n    [\n      {\n        \"id\": 2,\n        \"todo\": \"Buy a Car\",\n        \"priority\": \"MEDIUM\",\n        \"status\":\"TO DO\"\n        \"category\": \"HOME\",\n        \"dueDate\": \"2021-09-22\"\n      }\n    ]\n    ```\n\n- **Scenario 5**\n\n  - **Sample API**\n    ```\n    /todos/?category=WORK\u0026status=DONE\n    ```\n  - **Description**:\n\n    Returns a list of all todos whose category is 'WORK' and status is 'DONE'\n\n  - **Response**\n\n    ```\n    [\n      {\n        \"id\": 4,\n        \"todo\": \"Fix the bug\",\n        \"priority\": \"MEDIUM\",\n        \"status\": \"TO DO\",\n        \"category\": \"WORK\",\n        \"dueDate\": \"2021-01-12\"\n      }\n    ]\n    ```\n\n- **Scenario 6**\n\n  - **Sample API**\n    ```\n    /todos/?category=HOME\n    ```\n  - **Description**:\n\n    Returns a list of all todos whose category is 'HOME'\n\n  - **Response**\n\n    ```\n    [\n      {\n        \"id\": 2,\n        \"todo\": \"Buy a Car\",\n        \"priority\": \"MEDIUM\",\n        \"status\": \"TO DO\",\n        \"category\": \"HOME\",\n        \"dueDate\": \"2021-09-22\"\n      },\n      ...\n    ]\n    ```\n\n- **Scenario 7**\n\n  - **Sample API**\n    ```\n    /todos/?category=LEARNING\u0026priority=HIGH\n    ```\n  - **Description**:\n\n    Returns a list of all todos whose category is 'LEARNING' and priority is 'HIGH'\n\n  - **Response**\n\n    ```\n    [\n      {\n        \"id\": 1,\n        \"todo\": \"Learn Node JS\",\n        \"priority\": \"HIGH\",\n        \"status\": \"IN PROGRESS\",\n        \"category\": \"LEARNING\",\n        \"dueDate\": \"2021-04-04\"\n      }\n    ]\n    ```\n\n### API 2\n\n#### Path: `/todos/:todoId/`\n\n#### Method: `GET`\n\n#### Description:\n\nReturns a specific todo based on the todo ID\n\n#### Response\n\n```\n{\n  \"id\": 1,\n  \"todo\": \"Learn Node JS\",\n  \"priority\": \"HIGH\",\n  \"status\": \"IN PROGRESS\",\n  \"category\": \"LEARNING\",\n  \"dueDate\": \"2021-04-04\"\n}\n```\n\n### API 3\n\n#### Path: `/agenda/`\n\n#### Method: `GET`\n\n#### Description:\n\nReturns a list of all todos with a specific due date in the query parameter `/agenda/?date=2021-02-22`\n\n#### Response\n\n```\n[\n  {\n    \"id\": 3,\n    \"todo\": \"Clean the garden\",\n    \"priority\": \"LOW\",\n    \"status\": \"TO DO\",\n    \"category\": \"HOME\",\n    \"dueDate\": \"2021-02-22\"\n  }\n]\n```\n\n### API 4\n\n#### Path: `/todos/`\n\n#### Method: `POST`\n\n#### Description:\n\nCreate a todo in the todo table,\n\n#### Request\n\n```\n{\n  \"id\": 6,\n  \"todo\": \"Finalize event theme\",\n  \"priority\": \"LOW\",\n  \"status\": \"TO DO\",\n  \"category\": \"HOME\",\n  \"dueDate\": \"2021-02-22\"\n}\n```\n\n#### Response\n\n```\nTodo Successfully Added\n```\n\n### API 5\n\n#### Path: `/todos/:todoId/`\n\n#### Method: `PUT`\n\n#### Description:\n\nUpdates the details of a specific todo based on the todo ID\n\n- **Scenario 1**\n\n  - **Request**\n    ```\n    {\n      \"status\": \"DONE\"\n    }\n    ```\n  - **Response**\n\n    ```\n    Status Updated\n    ```\n\n- **Scenario 2**\n\n  - **Request**\n    ```\n    {\n      \"priority\": \"HIGH\"\n    }\n    ```\n  - **Response**\n\n    ```\n    Priority Updated\n    ```\n\n- **Scenario 3**\n\n  - **Request**\n\n    ```\n    {\n      \"todo\": \"Clean the garden\"\n    }\n    ```\n\n  - **Response**\n\n    ```\n    Todo Updated\n    ```\n\n- **Scenario 4**\n\n  - **Request**\n    ```\n    {\n      \"category\": \"LEARNING\"\n    }\n    ```\n  - **Response**\n\n    ```\n    Category Updated\n    ```\n\n- **Scenario 5**\n\n  - **Request**\n    ```\n    {\n      \"dueDate\": \"2021-01-12\"\n    }\n    ```\n  - **Response**\n\n    ```\n    Due Date Updated\n    ```\n\n### API 6\n\n#### Path: `/todos/:todoId/`\n\n#### Method: `DELETE`\n\n#### Description:\n\nDeletes a todo from the todo table based on the todo ID\n\n#### Response\n\n```\nTodo Deleted\n```\n\n\u003cbr/\u003e\n\nUse `npm install` to install the packages.\n\n**Export the express instance using the default export syntax.**\n\n**Use Common JS module syntax.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchisa-dev%2Ftodo_app_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchisa-dev%2Ftodo_app_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchisa-dev%2Ftodo_app_api/lists"}