Mock Server
https://online-shop-personal-a2a078cc9446.herokuapp.com/ - URL, deployed to HEROKU
/login
curl --location --request POST 'https://online-shop-personal-a2a078cc9446.herokuapp.com/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"username" : "Somebody",
"password" : "mypassword"
}'
/logout
curl --location --request POST 'https://online-shop-personal-a2a078cc9446.herokuapp.com/logout' \
--header 'Content-Type: application/json' \
--data-raw '{"id_user" : 123}'
/register or /changeUserData
curl --location --request POST 'https://online-shop-personal-a2a078cc9446.herokuapp.com/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"id_user" : 123,
"username" : "Somebody",
"password" : "mypassword",
"email" : "[email protected]",
"gender": "m",
"credit_card" : "9872389-2424-234224-234",
"bio" : "This is good! I think I will switch to another language"
}'
curl --location --request POST 'https://gentle-depths-89634.herokuapp.com/changeUserData' \
--header 'Content-Type: application/json' \
--data-raw '{
"id_user" : 123,
"username" : "Somebody",
"password" : "mypassword",
"email" : "[email protected]",
"gender": "m",
"credit_card" : "9872389-2424-234224-234",
"bio" : "This is good! I think I will switch to another language"
}'
/getProductsList Available categories String "m" - meal and String "d" - drink https://github.com/westlaw7x7/VaporApp/blob/master/Sources/App/Models/ProductsData.swift
curl --location --request POST 'https://online-shop-personal-a2a078cc9446.herokuapp.com/getProductList' \
--header 'Content-Type: application/json' \
--data-raw '{
"id_category": "m"
}'
/getSingleProduct Available data - https://github.com/westlaw7x7/VaporApp/blob/master/Sources/App/Models/ProductsData.swift
curl --location --request POST 'https://online-shop-personal-a2a078cc9446.herokuapp.com/getSingleProduct' \
--header 'Content-Type: application/json' \
--data-raw '{
"id_product": "m1"
}'
/addReview
curl --location --request PUT 'https://online-shop-personal-a2a078cc9446.herokuapp.com/addReview' \
--header 'Content-Type: application/json' \
--data-raw '{
"review": "alalalalala",
"nameOfReviewer": "John",
"id": "m1"
}'
/deleteReview
curl --location --request PUT 'https://online-shop-personal-a2a078cc9446.herokuapp.com/deleteReview' \
--header 'Content-Type: application/json' \
--data-raw '{"id" : "m1"
}'