REST API used to teach a Flutter course, deployed on heroku here.
GET /sneakers
× https://curs-flutter.herokuapp.com/sneakers × Get a list of sneakers:
{
"status": "ok / fail",
"error": "null / an error",
"data": [
...,
{
"id": "sneaker_id",
"brand": "Sneaker Brand, ie: adidas (all lowercase, no spaces)",
"name": "The sneaker's model / display name",
"price": "The sneaker's price",
"image": "image_link"
},
...
]
}
GET /sneaker/[id]
× https://curs-flutter.herokuapp.com/sneaker/[id] × Get more info of a sneaker (by it's ID)
{
"status": "ok / fail",
"error": "null / an error",
"data": {
"id": "sneaker_id",
"brand": "Sneaker Brand, ie: adidas (all lowercase, no spaces)",
"name": "The sneaker's model / display name",
"price": "The sneaker's price",
"image": "image_link",
"desc": "Brand's description for this sneaker",
"url": "Official page link"
}
}
POST /sneaker
× https://curs-flutter.herokuapp.com/sneaker × Add a sneaker (if enabled in .env)
Request Body:
{
"brand": "Sneaker Brand, ie: adidas (all lowercase, no spaces)",
"name": "The sneaker's model / display name",
"price": "The sneaker's price",
"desc": "Brand's description for this sneaker",
"url": "Official page link"
}
Response:
{
"status": "ok / fail",
"error": "null / an error",
"data": "The newly added sneaker's ID"
}
- Note:
data
will be null if there's an error!
ADMIN_SDK_CREDS=<admin sdk credentials (b64 encoded)>
PORT=<port where to run the api>
ALLOW_ADDING=<allow POST /sneaker>
MIT - View
All images / products referenced in this project are the porperties of their respective owners.