0
0
Fork 0

Updated readme.md with endpoints

This commit is contained in:
Konrad Pierzyński 2019-01-13 18:29:21 +01:00
parent 4cfc024e65
commit 3b3978fc78
1 changed files with 53 additions and 21 deletions

View File

@ -2,11 +2,9 @@
DINO_SCRUM DINO_SCRUM
## EndPoints ## EndPoints
*POST* **/api/change-quantity** *POST* **/api/product/change-quantity**
```json ```json
{ {
@ -17,9 +15,19 @@ DINO_SCRUM
Return: Return:
??? ```json
{
"id": Int,
"name": String,
"price": Float,
"quantity": Int,
"imageLink": String
}
```
---- This endpoint return editet product.
---
*GET* **/api/get-all** *GET* **/api/get-all**
@ -27,20 +35,20 @@ Return:
``` ```
{ {
    [ [
    { {
     "id": Int, "id": Int,
           "name": String, "name": String,
           "price": Float, "price": Float,
           "quantity": Int, "quantity": Int,
            "imageLink": String "imageLink": String
    }, },
    {...} {...}
    ] ]
} }
``` ```
---- ---
*GET* **/api/get-price-of-all** *GET* **/api/get-price-of-all**
@ -52,9 +60,9 @@ Return:
} }
``` ```
---- ---
*POST* **/api/add-product** *POST* **/api/product/add**
```json ```json
{ {
@ -67,9 +75,19 @@ Return:
Return: Return:
???? ```json
{
    "id": Int,
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLink": String
}
```
---- This endpoint return a newly created product.
---
*DELETE* **/api/delete-product** *DELETE* **/api/delete-product**
@ -79,8 +97,22 @@ Return:
} }
``` ```
This endpoint doesn't return any data.
---
*GET* **/api/product/get-by-id**
Return: Return:
???? ```json
{
    "id": Int,
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLink": String
}
```
---- ----