4.1.0 • Published 9 years ago

timeeditapi v4.1.0

Weekly downloads
5
License
ISC
Repository
github
Last release
9 years ago

TimeEditApi

web scraper api to easy get schedule information from timeedit

Examples

const timeEditApi = require('timeeditApi');

const timeEdit = timeEditApi(
    'https://se.timeedit.net/web/lnu/db1/schema1/', // url
    4                                               // type
);

// todays schedule
timeEdit.getTodaysSchedule('ny105')
    .then((roomSchedule) => {
        console.log(JSON.stringify(roomSchedule, null, 2));
    }).catch((er) => {
        console.log(er);
    });

// schedule by specific date: year, month, day
timeEdit.getScheduleByDate('ny105', new Date())
    .then((roomSchedule) => {
        console.log(JSON.stringify(roomSchedule, null, 2));
    }).catch((er) => {
        console.log(er);
    });

// full schedule
timeEdit.getSchedule('ny105')
    .then((schedule) => {
        console.log(JSON.stringify(schedule, null, 2));
    }).catch((er) => {
        console.log(er);
    });

// search and see if exists
timeEdit.search('ny105')
    .then((result) => {
        console.log(JSON.stringify(result, null, 2));
    }).catch((er) => {
        console.log(er);
    });

// get all the types available
timeEdit.getAllTypes(
        'https://se.timeedit.net/web/lnu/db1/schema1/')
    .then((result) => {
        console.log(JSON.stringify(result, null, 2));
    }).catch((er) => {
        console.log(er);
    });

// get schedule by schedule url
timeEdit.getScheduleByScheduleUrl(
        'https://se.timeedit.net/web/lnu/db1/schema1/s.html?i=6Y7XYQQ7wZ36QvZ5071875y7YQ8')
    .then((result) => {
        console.log(JSON.stringify(result, null, 2));
    }).catch((er) => {
        console.log(er);
    });
4.1.0

9 years ago

4.0.0

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.4.0

9 years ago

2.2.0

10 years ago

2.1.1

10 years ago

2.1.0

10 years ago

2.0.0

10 years ago

1.1.0

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.0

10 years ago