From 3b3978fc7840d8838abe8e67467fcdf99154e529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20Pierzy=C5=84ski?= Date: Sun, 13 Jan 2019 18:29:21 +0100 Subject: [PATCH] Updated readme.md with endpoints --- README.md | 74 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 53 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index eb45967..a1458fb 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,9 @@ DINO_SCRUM - - ## EndPoints -*POST* **/api/change-quantity** +*POST* **/api/product/change-quantity** ```json { @@ -17,9 +15,19 @@ DINO_SCRUM Return: -??? +```json +{ + "id": Int, + "name": String, + "price": Float, + "quantity": Int, + "imageLink": String +} +``` ----- +This endpoint return editet product. + +--- *GET* **/api/get-all** @@ -27,20 +35,20 @@ Return: ``` { -    [ -     { -      "id": Int, -            "name": String, -            "price": Float, -            "quantity": Int, -            "imageLink": String -     }, -     {...} -    ] + [ + { + "id": Int, + "name": String, + "price": Float, + "quantity": Int, + "imageLink": String + }, + {...} + ] } ``` ----- +--- *GET* **/api/get-price-of-all** @@ -52,9 +60,9 @@ Return: } ``` ----- +--- -*POST* **/api/add-product** +*POST* **/api/product/add** ```json { @@ -67,9 +75,19 @@ Return: Return: -???? +```json +{ +    "id": Int, +    "name": String, +    "price": Float, +    "quantity": Int, +    "imageLink": String +} +``` ----- +This endpoint return a newly created product. + +--- *DELETE* **/api/delete-product** @@ -79,8 +97,22 @@ Return: } ``` +This endpoint doesn't return any data. + +--- + +*GET* **/api/product/get-by-id** + Return: -???? +```json +{ +    "id": Int, +    "name": String, +    "price": Float, +    "quantity": Int, +    "imageLink": String +} +``` ----