BreezeBound API is a Django-based RESTful service that allows users to create and manage travel schedules, including destinations, date ranges, and weather forecasts. It integrates with external services for geocoding and weather data.
- Python 3.8+
- Docker and Docker Compose
- PostgreSQL
-
Clone the repository:
git clone https://github.com/iamramtin/breezebound.git cd breezebound
-
Build and start the Docker containers:
docker-compose up --build
-
Apply migrations:
docker-compose exec web python manage.py migrate
- Destinations:
/api/destinations/
- Schedules:
/api/schedules/
- Schedule Destinations:
/api/schedule-destinations/
-
Create a destination:
curl -X POST http://localhost:8000/api/destinations/ \ -H "Content-Type: application/json" \ -d '{"city": "Paris", "country": "France"}'
-
List all destinations:
curl http://localhost:8000/api/destinations/
-
Retrieve a specific destination:
curl http://localhost:8000/api/destinations/1/
-
Update a destination:
curl -X PUT http://localhost:8000/api/destinations/1/ \ -H "Content-Type: application/json" \ -d '{"city": "Paris", "country": "France", "latitude": 48.8566, "longitude": 2.3522}'
-
Delete a destination:
curl -X DELETE http://localhost:8000/api/destinations/1/
-
Create a schedule:
curl -X POST http://localhost:8000/api/schedules/ \ -H "Content-Type: application/json" \ -d '{"name": "Summer Vacation 2024", "start_date": "2024-07-01", "end_date": "2024-07-14"}'
-
List all schedules:
curl http://localhost:8000/api/schedules/
-
Retrieve a specific schedule:
curl http://localhost:8000/api/schedules/1/
-
Update a schedule:
curl -X PUT http://localhost:8000/api/schedules/1/ \ -H "Content-Type: application/json" \ -d '{"name": "Updated Summer Vacation 2024", "start_date": "2024-07-02", "end_date": "2024-07-15"}'
-
Delete a schedule:
curl -X DELETE http://localhost:8000/api/schedules/1/
-
Get schedule summary:
curl http://localhost:8000/api/schedules/1/summary/
-
Get weather forecast for a schedule:
curl http://localhost:8000/api/schedules/1/weather/
-
Add a destination to a schedule:
curl -X POST http://localhost:8000/api/schedule-destinations/ \ -H "Content-Type: application/json" \ -d '{"schedule": 1, "destination": 1, "arrival_date": "2024-07-02", "departure_date": "2024-07-05"}'
-
List all schedule destinations:
curl http://localhost:8000/api/schedule-destinations/
-
Retrieve a specific schedule destination:
curl http://localhost:8000/api/schedule-destinations/1/
-
Update a schedule destination:
curl -X PUT http://localhost:8000/api/schedule-destinations/1/ \ -H "Content-Type: application/json" \ -d '{"schedule": 1, "destination": 1, "arrival_date": "2024-07-03", "departure_date": "2024-07-06"}'
-
Delete a schedule destination:
curl -X DELETE http://localhost:8000/api/schedule-destinations/1/
-
Get stay info for a schedule destination:
curl http://localhost:8000/api/schedule-destinations/1/stay_info/
To run the automated test suite:
docker-compose exec web python manage.py test api
This project is licensed under the MIT License - see the LICENSE file for details.