Skip to content
Hayden McAfee edited this page Oct 11, 2021 · 3 revisions

The Purdue.io API is completely open source - we encourage you to contribute to help build Purdue.io into something awesome! Start discussions if you're unsure of where you can help, or share ideas for what we can add!

Building and Running

Tools

Purdue.io is written in C# on .NET 5. It will run natively on most major architectures and operating systems (Windows, Linux, Mac OS).

Entity Framework is used to communicate with an underlying database provider. Currently, Purdue.io supports PostgreSQL and SQLite, but additional providers could be added with minimal effort.

To start developing locally, install the .NET SDK.

Install .NET SDK

CatalogSync

CatalogSync is the process used to pull course data from MyPurdue and synchronize it to a relational database store.

In order to access detailed course section information, CatalogSync requires a valid MyPurdue username and password.

CatalogSync also accepts options to configure which database provider and connection it uses.

Additional flags are available to configure CatalogSync behavior. Use the --help flag for more information.

cd src/CatalogSync

# To sync to default SQLite file purdueio.sqlite
dotnet run -- -u USERNAME -p PASSWORD

# To sync to a specific SQLite file
dotnet run -- -u USERNAME -p PASSWORD -d Sqlite -c "Data Source=path/to/file.sqlite"

CatalogSync will begin synchronizing course catalog data to purdueio.sqlite.

To sync to another database provider, use the -d and -c options to specify a database provider and connection string:

# To sync to a local PostgreSQL instance:
dotnet run -- -u USERNAME -p PASSWORD -d Npgsql -c "Host=localhost;Database=purdueio;Username=purdueio;Password=purdueio"

API

The API project contains the ASP web service used to provide the OData API.

To start the API, update appsettings.json with the database provider and connection string used with CatalogSync, and dotnet run.

The web service will be available by default at http://localhost:5000.

Clone this wiki locally