Catalog App
The application has a list of items within a variety of categories, as well as a user registration and authentication system. The user can include, update and delete their own items.
Requirements
- Require Python 2.7
- To use the third-party authentication system, you must have the following developer accounts:
Usage
-
Clone or download this repository
-
Install all dependencies with the following command
pip install -r requirements.txt
-
Download Google JSON file and save the file as secrets_google.json into the root folder.
-
In the secrets_facebook.json replace app_id and app_secret your own credentials app.
-
Run app with follow command
python run.py
API JSON
Samples:
http://localhost:8080/api/v1/catalog.json/{item_title}
Return Catalog Item by Title
{
"Item": {
"category_id": 1,
"description": "The ball used in the sport of association football. The name ...",
"id": 2,
"image": "http://localhost:8080/static/images/2.jpg",
"title": "Soccer Ball"
}
}
http://localhost:8080/api/v1/catalog.json
Returns all categories and their respective Catalog Items.
{
"Category": [
{
"id": 1,
"item": [
{
"category_id": 1,
"description": "The ball used in the sport of association football ..."
"id": 2,
"image": "http://localhost:8080/static/images/2.jpg",
"title": "Soccer Ball"
}
],
"name": "Soccer"
},
{
"id": 4,
"item": [
{
"category_id": 4,
"description": "An object used for one of the greatest sports ever...",
"id": 1,
"image": "http://localhost:8080/static/images/1.png",
"title": "Snowboard"
}
],
"name": "Snowboarding"
},
{
"id": 5,
"item": [],
"name": "Rock Climbing"
}
]
}