0
0
forked from s434786/DINO_SCRUM

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

View File

@ -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
}
```
----