Giter Site home page Giter Site logo

20220116-learn-flask's Introduction

POINT:

- GET: /point
response:
{
  "id": 1,
  "name": "point,
}

- POST: /point
body:
{
  "name": "point",
}

- PUT: /point/1
body:
{
  "name": "point edit",
}

- DELETE: /point/1
MISSION:

- GET: /mission
response:
{
  "id": 1,
  "name": "mission",
  "steps": [
    {
      "id": 1,
      "start_point": {
        "id": 1,
        "name": "point1",
      },
      "end_point": {
        "id": 2,
        "name": "point2",
      }
    },
    {
      "id": 2,
      "start_point": {
        "id": 1,
        "name": "point1",
      },
      "end_point": {
        "id": 2,
        "name": "point2",
      }
    }
  ]
}

- POST: /mission
body:
{
  "name": "mission",
  "steps": [
    {
      "start_point_id": 1,
      "end_point_id": 2
    },
    {
      "start_point_id": 1,
      "end_point_id": 2
    }
  ]
}

- PUT: /mission/1
body:
{
  "name": "mission edit",
  "steps": [
    {
      "start_point_id": 2,
      "end_point_id": 3
    },
    {
      "start_point_id": 4,
      "end_point_id": 5
    }
  ]
}

- DELETE: /mission/1
=> Delete mission and all steps
ROBOT:

- GET: /robot
response:
{
  "id": 1,
  "name": "agv 1"
  "robot_id": 1,
}
=> check robot is in group?

- POST: /robot
body:
{
  "name": "agv 1",
  "group_id": 1
}

- PUT: /robot/1
body:
{
  "name": "agv 1 edit",
}

- DELETE: /robot/1
GROUP:

- GET: /group
response:
{
  "id": 1,
  "name": "group 1",
  "robots": [
    {
      "id": 1,
      "name": "agv 1"
    },
    {
      "id": 2,
      "name": "agv 2"
    }
  ],
  "mission": {
    "id": 1,
    "name": "mission 1"
  }
}

- POST: /group
body:
{
  "name": "group 1",
  "robots_id": [1, 2],
  "mission_id": 1
}

- PUT: /group/1
body:
{
  "name": "group 1 edit",
  "robots_id": [1, 2],
  "mission_id": 1
}

- DELETE: /group/1
ORDER:

- GET: /order
response:
{
  "id": 1,
  "name": "order 1",
  "robot": {
    "id": 1,
    "name": "agv 1"
  },
  "mission": {
    "id": 1,
    "name": "mission 1"
  }
}

- POST: /group
body:
{
  "name": "order 1",
  "robot_id": 1,
  "mission_id": 1
}

- PUT: /group/1
body:
{
  "name": "order 1 edit",
  "robot_id": 1,
  "mission_id": 1
}

- DELETE: /group/1

20220116-learn-flask's People

Contributors

duyetvu2001 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.