This is a REST API to a Wishlist application made using Flask and MongoDB.
docker-compose build
docker-compose up -d
The API is hosted at http://localhost:5000/api/v1
.
For Creating a new User account.
{
"email": "<string>",
"password": "<string --min-length:6>"
}
{
"id": "<user_id>"
}
By sending a User's correct credentials you receive an JWT bearer token
.
{
"email": "<string>",
"password": "<string min-length:6>"
}
{
"token": "<jwt-bearer-token>"
}
All request on the API besides User Signup and User Login requires the user to be logged in.
To do so, use theJWT bearer token
retrieved at User Login as the Authentication method for the requests.|
Get the Wishlist of the current user.
[
{
"_id": {
"$oid": "<wish_id>"
},
"name": "<string>",
"description": "<string>",
"url": "<string>",
"image": "<string>",
"added_by": {
"$oid": "<user_id>"
}
}
]
Get a random wish from the User's Wishlist.
{
"_id": {
"$oid": "<wish_id>"
},
"name": "<string>",
"description": "<string>",
"url": "<string>",
"image": "<string>",
"added_by": {
"$oid": "<user_id>"
}
}
Get a single wish from the user's Wishlist.
{
"_id": {
"$oid": "<wish_id>"
},
"name": "<string>",
"description": "<string>",
"url": "<string>",
"image": "<string>",
"added_by": {
"$oid": "<user_id>"
}
}
Update a wish from the User's Wishlist.
{
"name": "<string:optional>",
"description": "<string:optional>",
"url": "<string:optional>",
"image": "<string:optional>"
}
"Wish updated"
Update a wish from the User's Wishlist.
"Wish deleted"