A Java-based application for managing drone delivery services.
GET /api/v1/drones/available-for-loading[
{
"id": 100,
"serialNumber": "SN001",
"model": "LIGHTWEIGHT",
"weightLimit": 300.0,
"batteryCapacity": 100,
"state": "IDLE",
"loadedMedications": []
},
{
"id": 101,
"serialNumber": "SN002",
"model": "MIDDLEWEIGHT",
"weightLimit": 400.0,
"batteryCapacity": 22,
"state": "IDLE",
"loadedMedications": []
}
] POST /api/v1/drones/{droneSerialNumber}/medications{
"medicationIds": [1, 2, 3]
}
Unloads medications from a drone and updates the drone's state to IDLE when it has no medications left
DELETE /api/v1/drones/{droneSerialNumber}/medications{
"medicationIds": [1, 2, 3]
}
GET /api/v1/drones/{droneSerialNumber}/medications[
{
"id": 1,
"code": "CODE2",
"name": "Medication 3",
"weight": 65.0,
"image": null,
"drone": null
},
{
"id": 4,
"code": "CODE5",
"name": "Medication 6",
"weight": 45.0,
"image": null,
"drone": null
}
]To run the project, you will need to have the following installed:
- Docker
- Git
Clone the project repository from GitHub:
git clone https://github.com/jumba2010/drone-service.git
Change into the project directory:
cd drone-service
Build the Docker image:
docker build -t drone-service .
Run the Docker container:
docker run -p 8085:8085 drone-service
Your application will be available on http://localhost:8085 . You can start performing the apis call