ntnu-course
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

NTNU Course

Query Course Information of National Taiwan Normal University.

Installation

NPM

npm i ntnu-course

YARN

yarn add ntnu-course

PNPM

pnpm i ntnu-course

Usage

This package supports both cjs and esm format.

// cjs
const query = require("ntnu-course");

// esm
import query from "ntnu-course";

Query Course Metadata

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: "資工系",
});

Query Course Full Information

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]);

Turn Off Cache

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();

Links

GitHub Repository

https://github.com/JacobLinCool/NTNU-Course

NPM Package

https://www.npmjs.com/package/ntnu-course

Documentation

https://jacoblincool.github.io/NTNU-Course/

NTNU Course Crawler

Related project.

https://github.com/JacobLinCool/NTNU-Course-Crawler

Package Sidebar

Install

npm i ntnu-course

Weekly Downloads

1

Version

0.1.5

License

MIT

Unpacked Size

93.3 kB

Total Files

9

Last publish

Collaborators

  • jacoblincool