Skip to content

Time-management and scheduling calendar service API for Australians ๐Ÿ—“๏ธ

License

Notifications You must be signed in to change notification settings

mahirahman/MyCalendarAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

MyCalendarAPI ๐Ÿ—“๏ธ

Time-management and scheduling calendar service API for Australians ๐Ÿ“†

Made with Python

Getting Started

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:

  1. CD to the directory of the project
  2. Install the requirements by using the command pip install -r requirements.txt
  3. Run app.py

Interface

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

Prerequisites

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

Notes

  • 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

Built With

Versioning

We use SemVer for versioning.

License

Authors

  • Mahi Rahman

About

Time-management and scheduling calendar service API for Australians ๐Ÿ—“๏ธ

Topics

Resources

License

Stars

Watchers

Forks

Languages