API for shopping list application
Clone this repo
https://github.com/MuthomiMate/Flask-Api.git
cd Flask-Api
source .env
pip install -r requirements.txt
python manage.py db init
python manage.py db migrate
python manage.py db upgrade
python manage.py test
nosetests --with-coverage --cover-package=tests && coverage report
To start application:
python run.py
Endpoints
Resource URL | Methods | Description | Requires Token |
---|---|---|---|
/auth/register/ | POST | User registers | FALSE |
/auth/login/ | POST | User login | FALSE |
/shoppinglists/ | POST | Creates shopping list | TRUE |
/shoppinglists/ | GET | Get all shopping list | TRUE |
/shoppinglists/int:id | PUT | Edit a shopping list | TRUE |
/shoppinglists/int:id | DELETE | Delete a shopping list | TRUE |
/shoppinglists/int:id | GET | Get a shopping list | TRUE |
/shoppinglists/int:shoppinglist_id/items/ | POST | Create a shoppinglist item | TRUE |
/shoppinglists/int:shoppinglist_id/items/ | GET | Get all shopping items in a shopping list | TRUE |
/shoppinglists/int :shoppinglist_id/items/int:id | PUT | Edit a shopping item | TRUE |
/shoppinglists/int: shoppinglist_id/items/int:id | DELETE | Delete a shoppinglist item | TRUE |
/shoppinglists/int: shoppinglist_id/items/int:id | GET | Get a single shoppinglist item | TRUE |
Method | Description |
---|---|
GET | Retrieves a resource(s) |
POST | Creates a new resource |
PUT | Edits an existing resource |
DELETE | Deletes an existing resource |