DINO_SCRUM/README.md

119 lines
1.2 KiB
Markdown
Raw Normal View History

2019-01-10 20:57:47 +01:00
# DINO_SCRUM
2019-01-13 16:49:48 +01:00
DINO_SCRUM
## EndPoints
2019-01-13 18:29:21 +01:00
*POST* **/api/product/change-quantity**
2019-01-13 16:49:48 +01:00
```json
{
"id": Int,
"change": Int
}
```
Return:
2019-01-13 18:29:21 +01:00
```json
{
"id": Int,
"name": String,
"price": Float,
"quantity": Int,
"imageLink": String
}
```
This endpoint return editet product.
2019-01-13 16:49:48 +01:00
2019-01-13 18:29:21 +01:00
---
2019-01-13 16:49:48 +01:00
*GET* **/api/get-all**
Return:
```
{
2019-01-13 18:29:21 +01:00
[
{
"id": Int,
"name": String,
"price": Float,
"quantity": Int,
"imageLink": String
},
{...}
]
2019-01-13 16:49:48 +01:00
}
```
2019-01-13 18:29:21 +01:00
---
2019-01-13 16:49:48 +01:00
*GET* **/api/get-price-of-all**
Return:
```json
2019-01-13 17:02:44 +01:00
{
"price-of-all": Float
}
2019-01-13 16:49:48 +01:00
```
2019-01-13 18:29:21 +01:00
---
2019-01-13 16:49:48 +01:00
2019-01-13 18:29:21 +01:00
*POST* **/api/product/add**
2019-01-13 16:49:48 +01:00
```json
{
"name": String,
"price": Float,
"quantity": Int,
"imageLing": String
}
```
Return:
2019-01-13 18:29:21 +01:00
```json
{
    "id": Int,
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLink": String
}
```
2019-01-13 16:49:48 +01:00
2019-01-13 18:29:21 +01:00
This endpoint return a newly created product.
---
2019-01-13 16:49:48 +01:00
*DELETE* **/api/delete-product**
```json
{
"id": Int
}
```
2019-01-13 18:29:21 +01:00
This endpoint doesn't return any data.
---
*GET* **/api/product/get-by-id**
2019-01-13 16:49:48 +01:00
Return:
2019-01-13 18:29:21 +01:00
```json
{
    "id": Int,
    "name": String,
    "price": Float,
    "quantity": Int,
    "imageLink": String
}
```
2019-01-13 16:49:48 +01:00
----