@juhosa/time-edit-api

1.0.1 • Public • Published

The TimeEditAPI

Get the events (the timetable) for a specific course from TimeEdit as a JavaScript object.

A little manual work is required to get the automation going, but it's one time only.

Installing

yarn add @juhosa/time-edit-api

Usage

const TimeEdit = require("@juhosa/time-edit-api");

// The constructor requires a base url (your school/org has its own)
const te = new TimeEdit(`https://cloud.timeedit.net/samk/web/public/`);
  
// Query the events for a specific course
te.getCourseEvents(courseId).then(results => {
    console.log(results.reservations)
});

Use the below code snippet to get the course id when you are in the 'Implementations´ schedules' page (paste it in the console).

document.getElementById('linksdata').attributes['data-searchidsenc'].nodeValue

Contribution

Want to see a feature get added? Submit a PR!

License

MIT

/@juhosa/time-edit-api/

    Package Sidebar

    Install

    npm i @juhosa/time-edit-api

    Weekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    3.58 kB

    Total Files

    4

    Last publish

    Collaborators

    • juhosa