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