npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

uiuc

v2.0.3

Published

An unofficial JS wrapper for the UIUC Course Directory

Downloads

21

Readme

UIUC Build Status

A JS wrapper for U of I's Course Schedule/Catalog API

Installation

$ npm install --save uiuc

Usage

This project uses some of the more popular ES6 features like Classes, Promises and arrow functions.

import or require it


import uiuc from 'uiuc' // ES6 Syntax

var uiuc = require('uiuc').default

Read the API Docs below for more information on how to use it

API

Don't use the constructors of any Classes. This won't get real data. They are used internally by a classes own fetch function. Use the fetch function of any class to instantiate it.

uiuc

Static Methods

getSchedule ( [options] )

Returns a Promise for a Schedule object You can optionally pass in options to get a more specific object (Year / Term / Subject)

Options:

  • year - (Number | String) - (optional) The year for a specific schedule.
  • term - (String) - (optional) The term for a specific schedule. Should be set to one of "spring", "fall", "winter", "summer". Requires year parameter to be set.
  • subject - (String) - (optional) The subject code for a specific schedule. Requires year and term parameters to be set.
  • active - (Boolean) - (optional) Set to true to only get classes that are currently offered. Set to false by default. Requires year, term and subject parameters to be set.

If you specify any options without specifying its required options, The function will behave as if the specific option wasn't passed.

Schedule

  • Array [Number] years -> The years for which courses can be looked up

Static Methods

fetch ()

Returns a Promise for Schedule object

Methods

year( [year] )

Returns a Promise for a Year object.

Parameters

  • year - (Number | String) - (optional) The year for a specific schedule. If set to "DEFAULT" or undefined, the latest year is used

Year

  • Number year -> The current Year
  • Array [String] terms -> The terms for which courses can be looked up

Static Methods

fetch ( options )

Returns a Promise for a Year object.

Options

  • year - (Number | String) - (optional) The year for a specific schedule. If set to "DEFAULT" or undefined, the latest year is used

Methods

term( [term] )

Returns a Term object.

Parameters

  • term - (String) - (optional) The term for a specific schedule. Should be set to one of "spring", "fall", "winter", "summer" or "DEFAULT". If set to "DEFAULT" or undefined, the latest term is used.

Term

  • Number year -> The current Year
  • String term -> The current Term
  • Array [String] subjects -> The subjects for which courses can be looked up

Static Methods

fetch ( options )

Returns a Promise for a Term object.

Options

  • year - (Number | String) - (optional) The year for a specific schedule. If set to "DEFAULT" or undefined, the latest year is used
  • term - (String) - (optional) The term for a specific schedule. Should be set to one of "spring", "fall", "winter", "summer" or "DEFAULT". If set to "DEFAULT" or undefined, the latest term is used.

Methods

subject( subject , [active])

Returns a Subject object.

Parameters

  • subject - (Object) Search parameters for Subject (need to have either title or code)
  • active - (Boolean) - optional Return only active courses (currently offered). Set to false by default.

Subject

  • Number year -> The current Year
  • String term -> The current Term
  • String subject -> The current Subject
  • String label -> Full title of current Subject
  • String collegeCode -> The College Code [No idea what this is]
  • String departmentCode -> Department Code
  • String unitName -> Name of Unit [Department]
  • String contactName -> Department contact name
  • String contactTitle -> Department contact title
  • String addressLine1 -> Department contact address (line 1)
  • String addressLine2 -> Department contact address (line 2)
  • String phoneNumber -> Department contact phone number
  • String websiteURL -> Department website
  • String collegeDepartmentDescription -> Self Explanatory
  • Object courses -> List of courses offered under this subject

Static Methods

fetch ( options )

Returns a Promise for a Subject object.

Options

  • year - (Number | String) - (optional) The year for a specific schedule. If set to "DEFAULT" or undefined, the latest year is used
  • term - (String) - (optional) The term for a specific schedule. Should be set to one of "spring", "fall", "winter", "summer" or "DEFAULT". If set to "DEFAULT" or undefined, the latest term is used.
  • subject - (String) - The subject code for a specific schedule.
  • active - (Boolean) - (optional) Return only active courses (currently offered). Set to false by default.

Methods

course( course, active )

Returns a Course object.

Parameters

  • course - (Object) Search parameters for Course (need to have either title or number)
  • active - (Boolean) - optional Return only active courses (currently offered). Set to false by default.

Course

  • Number year -> The current Year
  • String term -> The current Term
  • String subject -> The current Subject
  • String label -> Full title of course
  • String description -> Course Description
  • String creditHourse -> Number of Credits (Don't assume this is a number)
  • String courseSectionInformation -> self Explanatory
  • Array sections -> List of sections for this course

Static Methods

fetch ( options )

Returns a Promise for a Course object.

Options

  • year - (Number | String) - (optional) The year for a specific schedule. If set to "DEFAULT" or undefined, the latest year is used
  • term - (String) - (optional) The term for a specific schedule. Should be set to one of "spring", "fall", "winter", "summer" or "DEFAULT". If set to "DEFAULT" or undefined, the latest term is used.
  • subject - (String) - The subject code for a specific schedule.
  • course - (String) - The course number.
  • active - (Boolean) - (optional) Return only active courses (currently offered). Set to false by default.

Methods

section( section )

Returns a Section object.

Parameters

  • section - (Object) Search parameters for Section (need to have either section or crn)

Section

  • Number year -> The current Year
  • String term -> The current Term
  • String subject -> The current Subject
  • String sectionNumber -> The section number
  • String creditHourse -> Number of credits (Don't expect this to be a number)
  • String statusCode -> status code (No idea what this is)
  • String partOfTerm -> Part of which term (usually either one of 1, A, B)
  • String sectionStatusCode -> section status code (No idea what this is)
  • String enrollmentStatus -> ability to enroll in course
  • String startDate -> start date of course (section)
  • String endDate -> end date of course (section)
  • Array meetings -> list of meeting objects for course
    • String type -> type of section (Lecture, Discussion, Lab, etc.)
    • String start -> start time
    • String end -> end time
    • String daysOfTheWeek -> which days the section meets (in the form of'TR' or 'MWF' etc)
    • String roomNumber -> room number of venue
    • String buildingName -> building name of venue
    • Array instructors -> list of instructors for course

Static Methods

fetch ( options )

Returns a Promise for a Section object.

Options

  • year - (Number | String) - (optional) The year for a specific schedule. If set to "DEFAULT" or undefined, the latest year is used
  • term - (String) - (optional) The term for a specific schedule. Should be set to one of "spring", "fall", "winter", "summer" or "DEFAULT". If set to "DEFAULT" or undefined, the latest term is used.
  • subject - (String) - The subject code for a specific schedule.
  • course - (String) - The course number.
  • crn - (String) - The crn.
  • active - (Boolean) - (optional) Return only active courses (currently offered). Set to false by default.