Code Monkey home page Code Monkey logo

drone_medication_transportation's Introduction

Drones Introduction This is a service delivered via REST API that allows clients to communicate with the drones. It is initialized by some data on the data.sql file.

Build commands: Build: Run: npm run start Documentation: Content-type: application.json.

Link to postman json API tests:

localhost:3000/drone register drone (POST): Request body is given below: { "model": { "id": 4, "value": 500, "name": "HEAVY_WEIGHT" } } find drone by id(GET): localhost:3000/drone/{id} update drone (PUT): Request body is given below:

{
"id": 5,
"serialNumber": {
    "id": 5,
    "value": "PEGEN-BEU3S-OSO0A-2W1ZX-YRGYK-ULCLG"
},
"batteryCapacity": 100,
"model": {
    "id": 5,
    "value": 500,
    "name": "MIDDLE_WEIGHT"
},
"state": "IDLE",
"medications": []

}

Delete drone (DELETE): localhost:3000/drone/{id} Load Medications from drone(GET): localhost:3000/drone/load?droneId=3&medicationIds=1,2,3. It accepts drone id and list of medication ids Get drone from loaded medications: localhost:3000/drone/fromLoadedMedications/{droneId}. It checks loaded medications for a given drone. Find available drones(GET): localhost:3000/drone/available/{totalMedicationWeight}. It returns a list of drones that are available, given the total medication weight to be loaded. Get Battery level: localhost:3000/batteryLevel/{id}. Get drone battery level localhost:3000/med register medication(POST): Request body given: { "name": "paracetamol", "weight": 250 } Upload medication image(PUT): localhost:3000/med/{id} Content-type: multipart/form-data. It accepts a request param of type file

Get Medication (GET): localhost:3000/med/{id}

Update Medication (PUT): localhost:3000/med. Request body given:

{
"id": 2,
"name": "ibuprofen",
"weight": 70

} Delete medication (DELETE): localhost:3000/med/{id};

drone_medication_transportation's People

Contributors

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