/uwo-tt-api

API based on https://studentservices.uwo.ca/secure/timetables/mastertt/ttindex.cfm for University of Western Ontario course details

Primary LanguageGoGNU General Public License v3.0GPL-3.0

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

UNOFFICIAL UWO Timetable API

Simple API to access data from the Western Undergraduate Timetable.
The goal of this API is to give programmers a data interface to create software that that leverage UWO timetable information. For example, a custom timetable generator.

View Demo · Report Bug · Request Feature

Table of Contents

About The Project

Product Name Screen Shot

Currently, there exists no official timetable API and no unofficial options. To gather data from Western Undergraduate Timetable, each programmer must scrape the website themselves. This is not only tedious but challenging cause the website will start blocking requests if a single IP is overloading it. In my experiements, if a series of requests are made with less than a 10 second buffer between each, they will start getting blocked.

To overcome this issue, this API is designed with a built-in scraper. Every day, the scraper populates a database while waiting in between each request to ensure none is blocked. The API then provides a simple interface to query data from the database.

This API supports the following:

  • Pagination
  • Sorting
  • Filtering
  • Rate Limiting

The API has two main types of endpoint:

  1. Options - Data from form options.
  2. Courses - Data from form results

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

By using Docker, local development can start very easily. The only requirements are:

  • docker
  • docker-compose

Installation - Docker Compose

  1. Clone the repository
git clone https://github.com/cbaron3/uwo-tt-api.git
  1. Compose the docker images
docker-compose up --build

docker-compose spins up two images: an image for the API on port 8080 and a MongoDB image

Usage

For full API documentation, refer to Documentation

For usage examples, refer to Examples

Usage is currently limited to 120 requests per hour due to server limitations. This limit can be modified if the project warrants purchasing strong a better server.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU License. See LICENSE for more information.