Clone the repo
git clone https://github.com/cjmash/BucketList-API.git
use ssh
git@github.com:cjmash/BucketList-API.git
go to the root folder
cd bucketlist
Create the virtual environment
$mkvirtualenv myenv
Activate the virtual environment
$workon myenv
$pip install -r requirements.txt
Set Up Environment
Initialize, migrate, upgrade the database
$python manage.py db init
$python manage.py db migrate
$python manage.py db upgrade
Launch the Progam
$python run.py development
Interact with the API, send http requests using Postman
URL Endpoint | HTTP requests | access | status |
---|---|---|---|
/api/bucketlists/auth/register/ | POST | Register a new user | publc |
/api/bucketlists/auth/login/ | POST | Login and retrieve token | public |
/api/bucketlists/ | POST | Create a new Bucketlist | private |
/api/bucketlists/ | GET | Retrieve all bucketlists for user | private |
/api/bucketlists/<bucket_id>/ | GET | Retrieve a bucketlist by ID | private |
/api/bucketlists/<bucket_id>/ | PUT | Update a bucketlist | private |
/api/bucketlists/<bucket_id>/ | DELETE | Delete a bucketlist | private |
/api/bucketlists/<bucket_id>/items/ | GET | Retrive items in a given bucket list | private |
/api/bucketlists/<bucket_id>/items/ | POST | Create items in a bucketlist | private |
/api/bucketlists/<bucket_id>/items/<item_id>/ | DELETE | Delete an item in a bucketlist | prvate |
/api/bucketlists/<bucket_id>/items/<item_id>/ | PUT | update a bucketlist item details | private |
Run the APIs on postman to ensure they are fully functioning.