Skip to content

An API which will list the University of Waterloo courses that you can take after a given course.

License

Notifications You must be signed in to change notification settings

patelmohit/NextCoursesAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NextCoursesAPI

Build Status

NextCoursesAPI is an API which will help you select which University of Waterloo courses you can take next. Link to Swagger UI.

Motivation

Searching for courses to take in university can be a tricky endeavor. The courses you need to take can be difficult to plan out, especially if they have a long sequence of prerequisites. You might also be interested in finding out if any of the courses you have taken satisfy the prerequisites of courses you never heard about.

NextCoursesAPI seeks to solve this problem by allowing you to search for all of the courses that have your course as a prerequisite. You can start with a first year course that you took in the 1A term, and see all of the courses that require that first year course as a prerequisite. If you repeat this for all of your 1A courses, you will have a diverse list of courses that you might be able to take in your 1B term, which will help you with your course selections. The possibilities of courses you can take at UW are endless, and this tool will help you plan it out.

How does it work?

NextCoursesAPI is written in C#, and uses ASP.NET Core 2.2 for the Web API. It keeps track of all courses and their prerequisites in a SQLite database, which is manipulated through Entity Framework Core. All information about University of Waterloo Courses is retrieved through the UW Open Data Api. The database is built by first retrieving a list of all courses from the /courses endpoint, and then maintaining a mapping of their prerequisites by navigating the /courses/{subject}/{catalog_number}/prerequisites endpoint for each course.

Travis CI builds and tests the code. The Web API is currently running as an Azure Web App.

Logs are created through Serilog, and a folder src/Logs will be created which will contain the logs.

To assist with the use of this API, the API has been developed following the OpenAPI Specification. You can test the API from the Swagger UI without having to create your own request.

Sample Response

API response for PSYCH 257

Request:

curl -X GET "https://nextcoursesapi.azurewebsites.net/courses/PSYCH/257" -H  "accept: text/plain"

Response:

{
  "prerequisite_course": "PSYCH257",
  "next_courses": [
    {
      "course_name": "Human Motivation and Emotion",
      "course_title": "PSYCH332"
    },
    {
      "course_name": "Introduction to Clinical Psychology",
      "course_title": "PSYCH336"
    },
    {
      "course_name": "Social Science Advanced Research Methods Topics",
      "course_title": "PSYCH389"
    },
    {
      "course_name": "Research in Personality and Clinical Psychology",
      "course_title": "PSYCH397"
    },
    {
      "course_name": "Honours Seminar in Personality and Clinical Psychology",
      "course_title": "PSYCH457"
    },
    {
      "course_name": "Special Topics in Applied Psychology",
      "course_title": "PSYCH470"
    }
  ]
}

Deploying

Using the .NET Core CLI from the root directory, type the following commands:

cd src
dotnet run

Testing

You can run the NUnit tests by using the .NET Core CLI and typing the following command from the root directory:

cd tests
dotnet test

Update frequency

The database and web API will be updated each term, since the list of courses is updated each term. There is a helper class in src/Maintenance/BuildDatabases.cs which will assist with the creation of the SQLite database. You will need a valid UW Api Key in order to use the helper class.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

An API which will list the University of Waterloo courses that you can take after a given course.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages