4.1.0 • Published 8 years ago

timeeditapi v4.1.0

Weekly downloads
5
License
ISC
Repository
github
Last release
8 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

8 years ago

4.0.0

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.4.0

8 years ago

2.2.0

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.1.0

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.0

8 years ago