Skip to content

Instantly share code, notes, and snippets.

@mattparmett
Created March 25, 2013 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattparmett/5234355 to your computer and use it in GitHub Desktop.
Save mattparmett/5234355 to your computer and use it in GitHub Desktop.
Penn Study Spaces API v1 Documentation

PennStudySpaces API V1 Docs

Queries

GET http://www.pennstudyspaces.com/api?capacity=1&shr=10&smin=15&ehr=11&emin=15&date=2398610000000&format=json

Parameters

  • capacity: the number of people that will be occupying the desired room (required, integer)

  • Reservation time range:

    • shr: start hour (required, integer)
    • smin: start minutes (required, integer)
    • ehr: end hour (required, integer)
    • emin: end minutes (required, integer)

    For example, if you want to look for rooms that are free between 11:30 AM and 6:00 PM: &shr=11&smin=30&ehr=18&emin=00

  • date: the desired date for which you'd like to search for rooms, in Unix format (required, integer)

    Currently, this parameter doesn't seem to affect the api results, but is necessary to include to avoid errors

  • format: the format in which the results are returned (required, string)

    Possible values:

    • json: returns data in json format
    • All other values return data in html format

Response

{
  buildings: {
    {
      latitude: 39.95233,
      longitude: -75.1906,
      name: "Towne Building",
      roomkinds: {
        {
          has_big_screen: true, # True if room has a projector
          
          # "N" => no reservation system available (first come, first serve)
          # "E" => external reservation system, i.e. Huntsman GSRs
          reserve_type: "N", 
          
          has_computer: true,
          name: "Conference Room",
          
          # "P" => private room
          # "S" => shared (common) space
          privacy: "P",
          
          has_whiteboard: true,
          max_occupancy: 45,
          comments: "",
          rooms: [
            {
              availabilities: {
                2012-11-16: [
                  [0, 2400], # The hours during which the room is open
                  [[0, 1230], [1400, 1430]] # The hours during which the room is available for reservation
                ],
                2012-11-17: [
                  [0, 2400],
                  [[0, 1230], [1400, 1430]]
                  ]
                ],
                2012-11-14: [
                  [0, 2400],
                  [[0, 1230], [1400, 1430]]
                ],
                2012-11-15: [
                  [0, 2400],
                  [[0, 1230], [1400, 1430]]
                ]
              },
              name: "Towne Conference Room 337",
              id: 97
            }
          ]
        },
        {...},
        {...}
      },
      {...},
      {...},
    },
    {...},
    {...},
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment