Skip to content

kshvmdn/uoft-ace-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uoft-ace-api

An API for retrieving real-time data for Academic and Campus Events at the University of Toronto (St. George).

Data source: http://www.ace.utoronto.ca/bookings.

Installation

  • Requirements:

  • Install with go get:

    $ go get github.com/kshvmdn/uoft-ace-api
  • Or, build directly from source:

    $ git clone https://github.com/kshvmdn/uoft-ace-api $GOPATH/src/github.com/kshvmdn/uoft-ace-api
    $ cd $_
    $ make

Usage

  • Start Redis. Add --daemonize yes to run in background.

    $ redis-server [--daemonize yes]
  • Start the server. The environment variables are optional, the defaults are shown below.

    $ PORT=8080 REDIS_PORT=6379 REDIS_PASSWORD="" REDIS_DB=0 ./uoft-ace-api
  • Endpoints:

    • /calendar/{building:[a-zA-Z]+}

      • Retrieve a schedule for the current week for all the rooms of the building provided.

      • Output format:

        [{
          building_code: String,
          name: String,
          rooms: [{
            room_number: String,
            schedule: [{
              date: String,
              bookings: [{
                time: String,
                description: String
              }]
            }]
          }]
        }]
      • Example: /calendar/BA

    • /calendar/{building:[a-zA-Z]+}/{room:[0-9a-zA-Z]+}

      • Retrieve a schedule for the current week for the room provided.

      • Output format:

        {
          room_number: String,
          schedule: [{
             date: String,
             bookings: [{
               time: String,
               description: String
             }]
           }]
        }
      • Example: /calendar/BA/1130

Contribute

This project is completely open source, feel free to open an issue for bugs/requests or submit a pull request!

About

An API for UofT room and building schedules, via ACE (http://ace.utoronto.ca).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published