Time-management and scheduling calendar service API for Australians ๐
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See below for prerequisite libraries and notes on how to deploy the project on a live system.
git clone https://github.com/mahirahman/MyCalendarAPI.git
To run the application locally:
- CD to the directory of the project
- Install the requirements by using the command
pip install -r requirements.txt
- Run
app.py
Endpoint | Description | Method | Data Type | Response |
---|---|---|---|---|
/events |
Create an event specified by the given payload | POST | Payload: { name, date, from, to, location: {street, suburb, state, post-code } description } Return Type: { id, last-update, _links: { self: { href } } } |
201: Event Created Successfully 400: Validation Error |
/events?order=<CSV-FORMATED-VALUE>&page=1&size=10&filter=<CSV-FORMATED-VALUE> |
Get all events | GET | Parameters: order, page, size, filter Return Type: {page, page-size, events: [ {id, name}, ... ], _links: { self: { href }, previous: { href } , next: { href } } } |
200: Successfully Retrieved All Events 400: Validation Error 404: Events Not Found |
/events/{id} |
Get an event by its ID |
GET | Parameters: id Return Type: { id, last-update, name, date, from, to, location: {street, suburb, state, post-code } description, _metadata: { wind-speed, weather, humidity, temperature, holiday, weekend }, _links: { self: { href }, previous: { href } , next: { href } } } } |
200: Successfully Retrieved Event 404: Event Not Found 500: Error Getting Data From External API |
/events/{id} |
Update an event by its ID |
PATCH | Parameters: id Payload: { name, date, from, to, location: {street, suburb, state, post-code } description, } Return Type: { id, last-update, _links: { self: { href } } } |
200: Event Updated Successfully 400: Validation Error 404: Event Was Not Found |
/events/{id} |
Delete an event by its ID |
DELETE | Parameters: id Return Type: {message, id} |
200: Event Deleted Successfully 404: Event Was Not Found |
/events/statistics?format=<json/image> |
Get all event statistics | GET | Parameters: format Return Type: json / image |
200: Successfully Retrieved Event Statistics 400: Validation Error 404: No Events Found |
/weather?date=2023-04-29 |
Get the weather of popular Australian cities | GET | Parameters: date Return Type: image |
200: Successfully Retrieved Weather 400: Validation Error 500: Error Retrieving Weather Data |
Python 3.7.x
Flask 1.1.2
flask_restx 1.1.0
geopandas 0.10.2
matplotlib 3.5.3
pandas 1.3.5
requests 2.25.1
shapely 2.0.1
- Database is stored in the root directory of the project as
database.db
- The API is for personal use only (individual) and is not intended for commercial use
- Python 3.7 - Programming Language
- Flask RESTx - API Library
- Geopandas - Process Geographic Data
- Matplotlib - Visualization Library
We use SemVer for versioning.
- Mahi Rahman