Laundry

The Laundry API provides information about laundry rooms, the machines therein, and the availability of these machines.

List All Laundry Rooms

Endpoint: /laundry/rooms
Arguments: None.
Returns: A JSON dictionary containing a list of all the laundry rooms and their associated IDs:

{'num_result': INTEGER, 
    'results': [{'id': STRING, 'name': STRING}, ...]}

Get Laundry Room Details

Endpoint: /laundry/rooms/room
Arguments:

  • room: the ID of the room in question

Returns: Details about the room in the form:

 {'result': {
      'id': STRING,
    'name': STRING,
'machines': [{'id': STRING, 'type': STRING}, ...]}}

List All Laundry Machines in a Room

Endpoint: /laundry/rooms/room/machines
Arguments:

  • room: the ID of the room in question
  • get_status (optional): an boolean indicating whether or not to include the status of the machines (availability, minutes remaining, etc.)

Returns: A list of machines and their associated IDs in the form:

{'results': [{'id': STRING, 'type': STRING}, ...]}

If get_status is true, each result will also contain:

  • avail: BOOL, indicating whether or not the machine is available
  • time_remaining: INTEGER, indicating number of minutes until machine is done, may be non-zero even if avail is true
  • message: STRING, with a special status message about this machine if applicable, or null

Get Laundry Machine Details

Endpoint: /laundry/rooms/room/machines/machine_id
Arguments:

  • room: the ID of the room in question
  • machine_id: the ID of the machine in question
  • get_status (optional): a boolean indicating whether or not to include the status of the machines (availability, minutes remaining, etc.)

Returns: Details about the machine in the form:

{'result': {'id': STRING, 'type': STRING}}

If get_status is true, the result will also contain the additional fields contained at the List All Laundry Machines in a Room endpoint.