What would you like to do in the next few years? Climbs a mountain? Learn to ride a bike? It's important to keep track of what you have already done and what you are yet to achieve. Smart Goals allows you to register and achieve all these feats and also allows you to tick off what you have done.
This app is built on Smart Goals It is a continuation only this will use a RESTFUL API and database as opposed to python data structures like lists and dictionaries as data stores
Create Read Update Delete bucketlist & Items
After cloning the repo into your local machine
$ export WORKON_HOME=~/Environs
$ export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
$ cd smart-goals-api
$ virtualenv sm-goal-api
Install all package requirements in your python virtual environment.
pip install -r requirements.txt
To run tests
nosetests tests/
Coverage Tests
coverage run -m unittest discover && coverage report
Follow this link to check out the documentation
Endpoint | Description |
---|---|
POST /auth/register | Register user. Request should have name and password in form data. |
POST /auth/login | Login user. Session token is valid for 30 minutes. |
POST /auth/logout | Logout user. |
POST /bucketlists/ | Create a new bucket list. Request should have desc in form data. |
GET /bucketlists/ | List all the created bucket lists. |
GET /bucketlists/ | Get single bucket list. |
PUT /bucketlists/ | Update single bucket list. Request should have desc in form data. |
DELETE /bucketlists/ | Delete single bucket list. |
POST /bucketlists//items | Add a new item to this bucket list. Request should have goal in form data. |
PUT /bucketlists//items/<item_id> | Update the bucket list completion status to true. |
DELETE /bucketlists//items/<item_id> | Delete this single bucket list item. |
GET /bucketlists?limit=5 | Get 5 bucket list records belonging to user. |
GET /bucketlists?q=draw | Search for bucket lists with phrase or words draw |
https://demo-smart-goals-api.herokuapp.com/
- Brian Hawi Odhiambo
- Python 3.6 Documentation
- Flask 0.12.2 Documentation
- Flask-Restful 0.3.6 Documentation
- PostgresSQL 9.5.7
- Various Internet resources and Friends, James Kinyua, Herman Sifuna, Josiah Nyarega