1
0
forked from s434786/DINO_SCRUM
DINO_SCRUM/README.md
2019-01-13 18:29:21 +01:00

119 lines
1.2 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# DINO_SCRUM
DINO_SCRUM
## EndPoints
*POST* **/api/product/change-quantity**
```json
{
"id": Int,
"change": Int
}
```
Return:
```json
{
"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:
```json
{
"price-of-all": Float
}
```
---
*POST* **/api/product/add**
```json
{
"name": String,
"price": Float,
"quantity": Int,
"imageLing": String
}
```
Return:
```json
{
    "id": Int,
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLink": String
}
```
This endpoint return a newly created product.
---
*DELETE* **/api/delete-product**
```json
{
"id": Int
}
```
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
}
```
----