Git Product home page Git Product logo

todolist's Introduction

To Do list web application

Developer: Heydarli Atabay

List of APIs offered by the server

Getting all Tasks

  • [GET http://localhost:3001/api/tasks]
  • [This API is just taking all tasks from the DB]
  • [{ id: task.id, description: task.description, important: task.important, private: task.private, deadline:task.deadline }]
  • [error response: "Getting Tasks from server was unsuccesful " + error object]

Getting filtered tasks

Getting Task with selected id

  • [GET http://localhost:3001/api/tasks/:taskID]
  • [This API is taking a task with a given ID]
  • [GET http://localhost:3001/api/tasks/5]
  • [{id: task.id, description: task.description, important: task.important, private: task.private, deadline:task.deadline} WHERE ID=GIVEN taskID]
  • [Error response: "Cannot get a task with selected id: {taskID}" + error object]

Creating a new task to the server

  • [POST http://localhost:3001/api/tasks]
  • [Inserting a task, getting info from the request body of the API]
  • [{ "description": "Test 2", "important": 1,"private": 1, "deadline":"2021-05-25 15:00" , "completed":0, "user":1 }]
  • ["New task with id:{taskID for new task} was added to the DB"]
  • [Error response: "Adding a new task was unsuccessful" + error object]

Updating a task with given ID

  • [PUT http://localhost:3001/api/tasks/update/:taskID]
  • [Updating selected task with a given ID, info to be updated is taken from the request body]
  • [PUT http://localhost:3001/api/tasks/update/12 { "description": "Make a reservation for the study room 2R", "important": 0,"private": 0, "deadline":"2021-05-19 16:00" , "completed":1, "user":1 } ]
  • ["Task with id:{taskId} was updated succesfully"]
  • [Error response: " There was error while updating the task with id:{taskId}"+ error object]

Updating task's status to completed

  • [PUT http://localhost:3001/api/tasks/update/completed/:taskID]
  • [Changing the status of the task from uncompleted to completed]
  • [PUT http://localhost:3001/api/tasks/update/completed/9]
  • ["Status of task with id: {taskID} was changed to Completed"]
  • [Error response:"Error while updating the status of the task with id:{taskID}" + error object]

Updating task's status to uncompleted

  • [PUT http://localhost:3001/api/tasks/update/uncompleted/:taskID]
  • [Changing the status of the task from completed to uncompleted]
  • [PUT http://localhost:3001/api/tasks/update/completed/8]
  • ["Status of task with id: {taskID} was changed to Uncompleted"]
  • ["Error while updating the status of the task with id:{taskID}" + error object]

Deleting selected task

  • [DELETE http://localhost:3001/api/tasks/delete/:taskID]
  • [Deleting the task with given ID, which is taken from the API request]
  • DELETE http://localhost:3001/api/tasks/delete/15]
  • [Selected task with id:{taskId} was deleted]
  • [Error response: " Error while deleting the task with id:{taskId} " + error object]

Test Users

Email address Password
[email protected] atabay11
[email protected] password
[email protected] soufi11

todolist's People

Contributors

github-classroom[bot] avatar heydarliatabay avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.