This is an app built on python running on the flask framework. It supports creating, editing, viewing and deleting both bucket lists and bucketlist items.
ENDPOINT | METHOD | FUNCTIONALITY | PUBLIC ACCESS |
---|---|---|---|
/auth/register |
POST | Signs up a user | FALSE |
/auth/login |
POST | Logins in a user | FALSE |
/bucketlists/ |
GET | Lists all bucketlists | FALSE |
/bucketlists/ |
POST | Creates a bucketlist | FALSE |
/bucketlists/<id> |
UPDATE | Updates bucketlist with given id | FALSE |
/bucketlists/<id> |
DELETE | Updates bucketlist with given id | FALSE |
/api/bucketlists/<id>/items |
POST | Creates an item in a bucketlist | FALSE |
/api/bucketlists/<id>/items/<id> |
GET | Get a specific item | FALSE |
/api/bucketlists/<id>/items/<id> |
UPDATE | Update an item matching the id | FALSE |
/api/bucketlists/<id>/items/<id> |
DELETE | Delete an item matching the id | FALSE |
- Git clone the repo
- Create a virtualenv
mk virtualenv venv
- Activate the environment
workon venv
- Pip install requirements by running
pip install -r requirements.txt
- Run the server
python manage.py runserver
For this API, use curl or postman. This app was tested using postman and the screenshots and video are from postman.
To register, a username and password is required.
To register, a username and password is required. This method returns a token that is used as authorization.
This method creates a password. A bucketlist name is required as well as authorization in the form of a token.
This method returns all the bucketlists when an ID is not specified. When specified, it returns the specific bucketlist.
This method returns the specific bucketlist that matches the given id while displaying the items it contains.
An ID is required to edit a specific bucketlist. The body has the new name of the bucketlist.
An ID is required to delete a specific bucketlist.
In a specific id, an item is created. The body contains the item name and the done status.
This method edits a specific item thus an id has to be specified. An item name is required as well as the done status.
This method deletes the item that is specified.
##Dependencies
- flask_restful
- Postgres
- flask_sqlalchemy
- Nosetests