Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.
Paul Hutchings edited this page Nov 17, 2019 · 12 revisions

API

Notes

Day abbreviations are as follows:

  • M - Monday
  • T - Tuesday
  • W - Wednesday
  • R - Thursday
  • F - Friday
  • S - Saturday
  • U - Sunday

Campus abbreviations are as follows:

  • MN - Main
  • JP - Japan
  • CC - Center City

Request

All requests to the backend API should have the following format:

{
    "courses": ["<COURSE NAMES>"],
    "days": "<string>",
    "startTime": "<number> (-1-2400)",
    "endtime": "<number> (-1-2400)",
    "campus": ["<string>"]
}

Response

All API requests to the backend will return the following object: Note, each item in each schedule represents a single meeting time of each class (ie a MWF course will have three objects)

[
    [
        {
            "day": "<string>",
            "startTime": "<number>",
            "endTime": "<number>",
            "enrollment": {
                "full": "<number>",
                "total": "<number>"
            },
            "professor": "<string>",
            "location": {
                "building": "<string>",
                "room": "<string>"
            },
            "course": {
                "name": "<string>",
                "title": "<string>"
            },
            "sectionNum": "<number>",
            "crn": "<number>"
        }
    ]
]

Structure of JSON to Import into the Database

{
  "classTimes": [
    {
      "building": "SERC",
      "day": "M",
      "endTime": "1150",
      "roomNumber": "100",
      "startTime": "1100",
      "type": "lect"
    }
  ],
  "courseName": "CIS 1001",
  "crn": 123456,
  "currentSeats": 5,
  "currentWaitlist": 0,
  "isOpen": true,
  "professor": "Bob Smith",
  "section": "01",
  "title": "Introduction to Computer Science",
  "totalSeats": 100,
  "totalWaitlist": 100,
  "campus": "MN"
}