Please consult the official Nikel API docs for information on query values, and response values.
npm install nikel
To use the higher-level APIs:
import { Courses } from 'nikel';
// Get courses for id=mat135
const my_courses = await Courses.where({ id: 'mat135' }).get() // An array of courses
// Or Using .then()
Courses.where({ id: 'mat135' }).get()
.then(my_courses => console.log);To access the lower-level APIs directly:
// TypeScript (highly encouraged)
import {Nikel} from 'nikel';
// JavaScript
const {Nikel} = require('nikel');
// Initialize Nikel API client
const client = new Nikel();
// Get courses for id=mat135
client.getCourses({id: "mat135"})
.then(resp => console.log(JSON.stringify(resp.data.response, null, 4)));Each method uses the following format:
get<titled_endpoint_name>(params)
params is a key-value object used to filter results.
Please consult the official documentation for all available endpoints.
getCourses
getTextbooks
getExams