Skip to content

A JavaScript API for the Middlebury course catalog.

Notifications You must be signed in to change notification settings

coursereviews/catalog.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

catalog.js

A JavaScript API for the Middlebury course catalog.

Build Status

Install

$ npm install --save middlebury-catalog

Examples

Scrape the course catalog for term 201590. The URL is automatically constructed based on the term.

const catalog = require('middlebury-catalog');

catalog('201590')
  .catalogFromUrl()
  .then(function (catalog) {
    console.log(catalog.courses[0]);
  });

Specify an XML file to scrape from. You must still provide a term to catalog.

const catalog = require('middlebury-catalog');

catalog('201590')
  .catalogFromFile('test/test.xml')
  .then(function (catalog) {
    console.log(catalog.courses[0]);
  });

Develop

Clone the repository then run:

$ npm install

Run the tests with:

$ npm test

About

A JavaScript API for the Middlebury course catalog.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published