-
Notifications
You must be signed in to change notification settings - Fork 0
Auction Feature
vector2588 edited this page Feb 8, 2022
·
3 revisions
[GET] : http://localhost:8080/see-all-auction
[
{
"auctionId": Integer,
"auctionItem": Item,
"highestPrice": Double,
"status": Boolean,
"startDate": Timestamp,
"endDate": Timestamp,
"histories": [AuctionUser]
}
]
example
{
"auctionId": 1,
"auctionItem": {
"itemId": 1,
"itemName": "Item 1",
"itemImage": "https://randomwordgenerator.com/img/picture-generator/52e2d64a4851a514f1dc8460962e33791c3ad6e04e507441722978d6944acc_640.jpg",
"itemDescription": "It is an item number 1",
"price": 0.0
},
"highestPrice": 15.5,
"status": false,
"startDate": "2022-02-07T17:56:38.992+00:00",
"endDate": "2022-02-07T17:56:38.992+00:00",
"histories": [
{
"auctionUser": {
"username": "Coal123",
"email": "[email protected]"
},
"submitPrice": 15.5,
"submitAt": "2022-02-07T17:58:13.282+00:00"
},
{
"auctionUser": {
"username": "Coal123",
"email": "[email protected]"
},
"submitPrice": 15.5,
"submitAt": "2022-02-07T17:58:13.963+00:00"
}
]
},
[POST] : http://localhost:8080/submit-price
body
{
"auctionId" : Integer,
"userId" : Integer,
"submitPrice" : Double
}
example
{
"auctionId" : 3,
"userId" : 1,
"submitPrice" : 12.50
}
[POST] : http://localhost:8080/items/end-acution/{auctionId}
response [Item]
example http://localhost:8080/items/end-acution/1
{
"itemId": 1,
"itemName": "Item 1",
"itemImage": "https://randomwordgenerator.com/img/picture-generator/52e2d64a4851a514f1dc8460962e33791c3ad6e04e507441722978d6944acc_640.jpg",
"itemDescription": "It is an item number 1",
"price": 15.5
}
[GET] : http://localhost:8080/auctionList/{UserId}
example http://localhost:8080/auctionList/1
{
"username": "Coal123",
"firstname": "Coal",
"lastname": "Ingot",
"own": [
{
"itemId": 1,
"itemName": "Item 1",
"itemImage": "https://randomwordgenerator.com/img/picture-generator/52e2d64a4851a514f1dc8460962e33791c3ad6e04e507441722978d6944acc_640.jpg",
"itemDescription": "It is an item number 1",
"price": 1.2
}
],
"history": [
{
"auctionUser": {
"username": "Coal123",
"email": "[email protected]"
},
"submitPrice": 300.0,
"submitAt": "2022-02-08T04:33:05.899+00:00",
"auctionId": null
}
]
}