-
-
Save josephfinlayson/7692a2d971bce1503aeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//all are /application/json | |
//Offering an item | |
// POST request to endpoint /api/postItem | |
{ | |
itemName: String, | |
itemPrice: Number, | |
Description: String, | |
lockerCode: String, | |
image: String, //BASE64 | |
sellerID: String //could be mapped to a NEO4J db ID?? | |
lockerID: String // DB ID? | |
} | |
// Item listings - This could be the complete | |
// GET request to endpoint /api/getItems?query=params&query2=params2 | |
// OR?? | |
// GET request to endpoint /api/getItems/:city | |
[{ | |
itemId: String, | |
image: String, //link to image | |
itemName: String, | |
itemPrice: String, | |
location: { | |
latlng: String, | |
locationInBuilding: String, | |
lockerIdentifier: String | |
}, //How will this be done if we want to anonymise the exact location of the locker | |
description:String, | |
},{/* */}] | |
// Item purchase | |
// POST to request to endpoint /api/postItem | |
{ | |
itemID: String, | |
buyerID: String | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment