Closed joshdoman closed 6 years ago
The API should have four components:
Sample JSON for (1):
{ "locations": [ { "id": 512, "name": "Education Commons", "service": "libcal" }, { "id": 26, "name": "Weigle", "service": "libcal" }, { ... } ] }
Sample JSON for (2):
{ "location_id": 512, "date": "2018-01-25", "rooms": [ { "room_id": 3, "name": "VP WIC Booth 01 (Capacity 6)", "image_url": "<URL HERE>", "times": [ { "booked": true, "start": "5:30pm", "end": "6:00pm" }, { "booked": false, "start": "6:00pm", "end": "6:30pm" }, ... ] }, { ... }, { ... } ] }
Sample Request JSON during POST request for (3):
{ "location_id": 512, "room_id": 3, "times": [1, 2] }
Sample Response JSON for (3) (until we can book the room ourself):
{ "success": true, "booking_url": "http://libcal.library.upenn.edu/reserve/spaces/vpdlc/" }
The API should have four components:
Sample JSON for (1):
Sample JSON for (2):
Sample Request JSON during POST request for (3):
Sample Response JSON for (3) (until we can book the room ourself):