A simple, no-hassle library for efficiently querying Your Enrollment Services.

Overview

@vanderbilt/yes-api

A simple, no-hassle library for efficiently querying Your Enrollment Services.

Created by Dylan Hanson (jovialis)

NOTE: THIS MODULE IS ESM ONLY IN CONJUNCTION WITH CHANGING NODE.JS COMMUNITY STANDARDS. READ MORE: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

Usage

Install

npm install @vanderbilt/yes-api

OR

yarn add @vanderbilt/yes-api

Import

import * as yes from "@vanderbilt/yes-api";

List All Available Subjects

This endpoint returns a list of subjects and their abbreviations. For example, Computer Science is abbreviated asCS.

// Subject[]
const subjects = await yes.getSubjects();

List All Available Terms

This endpoint lists all of the Terms available on YES, including their IDs and associated Sessions.

// Term[]
const terms = await yes.getTerms();

List All Sections

Returns a list of all of the Sections present on YES in a given Term. For example, CS 2201 may have 3 Sections, each of which will be returned as a unique record.

// Section[]
const sections = await yes.getAllSections(terms[0]);

Search All Sections

Returns up to 300 Sections fetched from YES using a search query in a given Term.
NOTE: THIS OPERATION CAN TAKE A LONG TIME! EXPECT UPWARDS OF 40 MINUTES FOR SPRING/FALL SEMESTERS.

// Section[]
const sections = await yes.searchSections("greece", terms[0]);

Fetch Section Details

Returns expanded details for a Section. This includes the section's current enrollment, notes, attributes, bookstore URL, and more. NOTE: This can be automatically fetched by passing true for the detailed param in getAllSections or searchSections.

// SectionDetails
const details = await yes.getSectionDetails(sections[0]);

Check Section Existence

Returns whether or not a Section exists within a given term. Note that this function accepts IDs, rather than objects.

// Boolean
const exists = await yes.sectionExists(sections[0].id, sections[0].term.id);

Response Streaming

Even though all functions return Promise-wrapped results, you can pass a handler as the last param to all functions in order to handle results as they are fetched from YES.

const sections = await yes.getAllSections(terms[0], false, (section, timeElapsed) => {
    console.log(term);
    console.log(`${timeElapsed}ms elapsed.`);
});

NOTE: The handler can return a promise!

const sections = await yes.getAllSections(terms[0], false, async (section, timeElapsed) => {
    await mongodb.collection('sections').insert(section);
});

FAQ

Does this API fetch ALL Courses?

  • For the most part, yes! There are a few exceptions. Due to our scraping algorithm and YES' limitations, we are unable to fetch courses with the course numbers 3850, 3851, 3852, (Independent reading/study) 7999, (Master's Thesis Research) 8999, (Non candidate research) 9999 (Ph.D dissertation research).

How should I use this package?

  • This API's speed is unfortunately limited by the speed of YES itself since it fetches data from the source with every request. Consider using this API in a batch process, uploading discovered data to a database or lake for fast, efficient querying and downstream processing.

Thanks

Special thanks to VUIT for necessitating this package's existence. Super special thanks to the Vanderbilt Administration, which has so far not filed a cease and desist.

You might also like...

This will create a REST API using Express JS and MongoDB removing the hassle of creating everything from scratch.

rest-api-init Fastest way to create REST API with Node.js, Express.js & MongoDB. Prerequisites Node.js needs to be installed. MongoDB Compass needs to

Dec 3, 2022

Offer a translation system to your users! a plugin capable of translating your website, simply and efficiently!

Offer a translation system to your users! a plugin capable of translating your website, simply and efficiently!

TranslateForMe Offer a translation system to your users, a plugin capable of translating your website, simply and efficiently! View Demo · Report Bug

Jan 12, 2022

Web application that manages your sales team efficiently.

Sales Incentive Management System Overview • Entities • APIs • Demo • Application Properties • Development • Build Overview Problem Statement Creating

Nov 28, 2022

This tool allows you to draw up plans for facilities from Foxhole's new Inferno update. It takes power and resource needs into account to help you efficiently design your facilities.

This tool allows you to draw up plans for facilities from Foxhole's new Inferno update. It takes power and resource needs into account to help you efficiently design your facilities.

Foxhole Facility Planner This tool allows you to draw up plans for facilities from Foxhole's new Inferno update. It takes power and resource needs int

Dec 23, 2022

Chrome Extension that enables you to read 30% more efficiently and easily!

Chrome Extension that enables you to read 30% more efficiently and easily!

Bionic Reading Extension that enables you to read 30% more efficiently and easily! About The Project All credits for this method go to https://bionic-

Jan 1, 2023

The Basement SDK has sensible defaults and flexibility to allow you to get the data you want efficiently and effortlessly.

Basement SDK The Basement SDK has sensible defaults and flexibility to allow you to get the data you want efficiently and effortlessly. Installation B

Dec 6, 2022

Open-source CD platform that helps developers to deliver applications efficiently by simplifying software releases and operations in any environment.

Open-source CD platform that helps developers to deliver applications efficiently by simplifying software releases and operations in any environment.

dyrector.io - The open source internal delivery platform Overview dyrector.io is an open-source internal delivery platform that helps developers to de

Jan 3, 2023

A quotaless, partially limitless, and fast Node.js Multiplayer Piano server implementation that efficiently makes use of the protocol and uWebSockets.js

speedymppserver A quotaless, partially limitless, and fast Node.js Multiplayer Piano server implementation that efficiently makes use of the protocol

Oct 14, 2022

Catalogist is the easy way to catalog and make your software and (micro)services visible to your organization in a lightweight and developer-friendly way.

Catalogist is the easy way to catalog and make your software and (micro)services visible to your organization in a lightweight and developer-friendly way.

catalogist 📚 📓 📒 📖 🔖 The easy way to catalog and make your software and (micro)services visible to your organization through an API You were a pe

Dec 13, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Querying Solana Blockchain, leveraging Magic Eden Apis!

Solana Bot Deployment Instructions- Create a bot on discord dev portal learn basics here Copy the Bot Token and go to OAuth field for URL generation F

Yog 5 Sep 8, 2022
A decentralized protocol for indexing and querying data from DecentraMix's on chain contracts across all supported blockchains.

A decentralized protocol for indexing and querying data from DeMix contracts across all supported blockchains.

DecentraWorld Ecosystem 92 May 3, 2022
Calculates maximum composite SLA for a list of sequentially provided cloud services or your custom-defined services.

SlaMax Calculates maximum composite SLA for a list of sequentially provided cloud services or your custom-defined services. Here are a few use-cases y

Mikael Vesavuori 4 Sep 19, 2022
This repository demonstrates how to integrate your Dialogflow agent with 3rd-party services services using a Node.JS backend service

This repository demonstrates how to integrate your Dialogflow agent with 3rd-party services services using a Node.JS backend service. Integrating your service allows you to take actions based on end-user expressions and send dynamic responses back to the end-user.

ddayto 10 Jul 21, 2022
An open-source analytics library to measure user events the hassle-free way.

walker.js The walker.js is an open-source event tracker for all tools. Easy, standardized & flexible. Capture user events in the browser by setting HT

elbwalker 181 Dec 22, 2022
An easy way to create a TypeScript library without hassle.

ts-lib-template An easy way to create a TypeScript library without hassle. ts-lib-template is a template for creating a TypeScript library. It comes b

Snehil K 7 Sep 13, 2022
The aim is to provide a hassle-free way to use the data to build applications to show close-to-realtime power-outage info in Mauritius

Mauritius Dataset for Electricity Dataset View Dataset The aim is to provide a hassle-free way to use the data to build applications. Example applicat

Sandeep Ramgolam 5 Dec 15, 2022