1
0
forked from s434786/DINO_SCRUM
DINO_SCRUM
Go to file
2019-01-23 11:07:24 +01:00
Magazyn_Client Added + zł and names for columns 2019-01-23 11:07:24 +01:00
LICENSE Initial commit 2019-01-10 19:57:47 +00:00
README.md Removed unecessary camel case usage 2019-01-13 18:38:30 +00:00

DINO_SCRUM

DINO_SCRUM

API 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
}