Skip to content
Galen Han edited this page Mar 4, 2017 · 8 revisions

GET /libraries

List all libraries

Response

[
  {
    "id": "int",
    "name": "string",
    "available": "int",
    "capacity": "int",
    "energyEfficiency": "int",
  },
  {}
]

GET /libraries/{id}

Response:

{
  "id": "int",
  "name": "string", 
  "available": "int",
  "capacity": "int",
  "energyEfficiency": "int",
  "spaceMap": {
    "gridHeight": "int",
    "gridWidth": "int",
    "seats": [
      {
        "coordinate": ["int", "int"],
        "available": true
      },
      {}
    ]
  }
}

GET /search

Parameters:

  • name - Name of library

Response:

[
  {
    "id": "int",
    "name": "string",
    "available": "int",
    "capacity": "int",
    "energyEfficiency": "int",
  },
  {}
]

POST /sensors/{sensorId}

Request body:

{
  sensorId: string,
  temperature: float,
  luminosity: int
  seats: {
    "1": bool,
    "2": bool,
    "3": bool,
    ...
  }
}

Clone this wiki locally