0
0
Fork 0
DINO_SCRUM
Go to file
Michał Starski 5cbb16fa30 Merge branch 'master' of s442333/DINO_SCRUM into master
Jest okej, przechodzi.
2019-01-13 18:37:38 +00:00
Magazyn_Client Corrected code - Stasiu's review #1 2019-01-13 18:05:47 +01:00
LICENSE Initial commit 2019-01-10 19:57:47 +00:00
README.md Updated readme.md with endpoints 2019-01-13 18:29:21 +01:00

README.md

DINO_SCRUM

DINO_SCRUM

EndPoints

POST /api/product/change-quantity

{
    "id": Int,
    "change": Int
}

Return:

{
    "id": Int,
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLink": String
}

This endpoint return editet product.


GET /api/get-all

Return:

{
    [
        {
            "id": Int,
            "name": String,
            "price": Float,
            "quantity": Int,
            "imageLink": String
        },
        {...}
    ]
}

GET /api/get-price-of-all

Return:

{
    "price-of-all": Float
}

POST /api/product/add

{
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLing": String
}

Return:

{
    "id": Int,
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLink": String
}

This endpoint return a newly created product.


DELETE /api/delete-product

{
    "id": Int
}

This endpoint doesn't return any data.


GET /api/product/get-by-id

Return:

{
    "id": Int,
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLink": String
}