/sit-timetable

A simple REST API and GraphQL build for CS@SIT student to get their timetable.

Primary LanguageTypeScriptMIT LicenseMIT

CS SIT Timetable API

License: MIT forthebadge forthebadge forthebadge forthebadge

forthebadge

A simple REST API and GraphQL build for CS@SIT student to get their timetable.

Build with Fastify and Apollo Server Fastify

The data extracted from the timetable in PDF using Google Cloud Vision API and create a JSON representation of it by /util/readFromVision.ts

Available at https://timetable.cscms.me/

Installation & Usage

Install all the dependencies

yarn

Build the source code into JavaScript file

yarn build

Run it with Node

node build/main.js

REST API Endpoints

  • /api Get all subjects in that semester

    • Available query:

      • year: Integer of 1 to 4
      • fastTrack: true | false
      • room: string of the roomId (Ex: CB2308)
      • day: Monday | Tuesday | Wednesday | Thursday | Friday
    • Example Response

      [
          {
          "subject": "CSC261 Statistics for Scientists",
          "lecturer": "Dr.Debajyoti",
          "startTime": "13.30",
          "endTime": "16.30",
          "room": "CB2312",
          "year": [
            {
              "year": 1,
              "fastTrack": true
            },
            {
              "year": 2,
              "fastTrack": false
            }
          ],
          "day": "Monday"
        },...
      ]
  • /api/:subjectId Get a specific subject

    • Ex: /csc105 (Case insensitive)

    • Example Response

      {
        "subject": "CSC105 Web Application Development",
        "lecturer": "Asst. Prof. Dr. Chonlameth",
        "startTime": "13.00",
        "endTime": "17.00",
        "room": "Classroom 4/2",
        "year": [
          {
            "year": 1,
            "fastTrack": false
          }
        ],
        "day": "Wednesday"
      }

GraphQL API Endpoint

Available at /graphql