Giter Site home page Giter Site logo

todo-list-api's Introduction

TO-DO List Application

  • Create, Update & Delete a task
  • Update task status

Installation

  • composer install

  • Copy .env.example and name it .env

  • Add database configuration

  • Migrate

php artisan migrate:fresh --seed

API Endpoints

Application has several enpoints

Task List

Task endpoints.

Base URL: /api/v1/tasks

METHOD ENDPOINT PARAMETERS GET RETURNS SUCCESS CODE
GET /api/v1/tasks array of Tasks 200

Response example

{
   "data":[
      {
         "id":1,
         "title":"Sapiente perferendis enim aut magni repellat praesentium.",
         "short_description":"Sunt cupiditate iste enim quaerat unde ut omnis. Q...",
         "description":"Sunt cupiditate iste enim quaerat unde ut omnis. Quidem odio quam temporibus optio eos sunt. Optio sint est eum. Quod totam laborum aut ab rerum vitae distinctio commodi.",
         "status":{
            "id":1,
            "name":"Pending"
         },
         "task_status_id":1,
         "created_at":"19:53 19-12-2020"
      },
      {
         "id":2,
         "title":"Voluptatem magni omnis qui assumenda totam optio.",
         "short_description":"Corrupti magni eligendi dolorum. Id vel praesentiu...",
         "description":"Corrupti magni eligendi dolorum. Id vel praesentium magnam. Odio ducimus ut rerum. Laudantium assumenda reiciendis sed quod consequatur.",
         "status":{
            "id":1,
            "name":"Pending"
         },
         "task_status_id":1,
         "created_at":"19:53 19-12-2020"
      }
   ]
}

New Task

Task endpoints.

Base URL: /api/v1/tasks

METHOD ENDPOINT PARAMETERS GET RETURNS SUCCESS CODE
POST /api/v1/tasks array of Tasks 200

Request post params

{
    "title":"Deserunt voluptas saepe et dolores quo voluptatum.",
    "description":"Est non minus nemo id quae optio. Libero consequatur nemo consequatur doloribus maxime ipsum aspernatur cum. In et vel maiores totam magnam eos."
}

Response example

{
   "data":{
      "id":1,
      "title":"Deserunt voluptas saepe et dolores quo voluptatum.",
      "description":"Est non minus nemo id quae optio. Libero consequatur nemo consequatur doloribus maxime ipsum aspernatur cum. In et vel maiores totam magnam eos."
   }
}

List of things to improve

  • Add dockerfile
  • Add API endpoints tests
  • Add pagination to task list
  • Add filters to task list
  • Better API responses

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.