Bedroom Router - adamstelle/abba GitHub Wiki
POST /api/residence/:resID/bedroom
This route allows users to create bedrooms
Expected Headers
{ "x-powered-by": "Express",
"content-type": "application/json; charset=utf-8",
"content-length": "231",
"etag": "W/e7-c+x13byafOPJ7jsSWntIFw",
"date": "Thu, 13 Oct 2016 21:40:55 GMT",
"connection": "close"
}
Expected Body
{
"__v": 0,
"type": "Private bedroom",
"bedSize": "Queen",
"bedType": "Air mattress",
"sleepNum": 2,
"privateBath": true,
"userID": "57ffff672accedc03540204d",
"residenceID": "57ffff672accedc03540204f",
"_id": "57ffff672accedc035402050",
"photos": []
}
POST /api/bedroom/:bedroomID/photo
GET, PUT, DELETE /api/residence/:resID/bedroom/:bedID
This route allows users to read, update, and destroy bedrooms by referencing a specific bedroom ID.
Expected Headers
{
"x-powered-by": "Express",
"content-type": "application/json; charset=utf-8",
"content-length": "231",
"etag": "W/e7-c+x13byafOPJ7jsSWntIFw",
"date": "Thu, 13 Oct 2016 21:40:55 GMT",
"connection": "close"
}
Expected Body
{
"__v": 0,
"type": "Private bedroom",
"bedSize": "Queen",
"bedType": "Air mattress",
"sleepNum": 2,
"privateBath": true,
"userID": "57ffff672accedc03540204d",
"residenceID": "57ffff672accedc03540204f",
"_id": "57ffff672accedc035402050",
"photos": []
}