Skip to content

Instantly share code, notes, and snippets.

@josephfinlayson
Forked from elektrowolle/schema.js
Created June 20, 2015 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save josephfinlayson/7692a2d971bce1503aeb to your computer and use it in GitHub Desktop.
Save josephfinlayson/7692a2d971bce1503aeb to your computer and use it in GitHub Desktop.
//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