Query Course Information of National Taiwan Normal University.
npm i ntnu-course
yarn add ntnu-course
pnpm i ntnu-course
This package supports both cjs
and esm
format.
// cjs
const query = require("ntnu-course");
// esm
import query from "ntnu-course";
Returns a list of course meradata that matches the query.
For example, to query all courses that are offered by CSIE:
const meta = await query.meta({
department: "資工系",
});
In addition to the metadata, the full information includes other information such as grading policy, course description, etc.
To query the full information of a course, you should pass the metadata of the course as the first argument.
const info = await query.info(meta[0]);
The default behavior is to cache the result of the query in the memory.
You can turn off the cache by setting cache
to false
:
query.cache = false;
And if you want to clear the previous cache, you can use clear
:
query.clear();
https://github.com/JacobLinCool/NTNU-Course
https://www.npmjs.com/package/ntnu-course
https://jacoblincool.github.io/NTNU-Course/
Related project.