https://github.com/richie-south/timeeditapi
web scraper api to easy get schedule information from timeedit
https://github.com/richie-south/timeeditapi
npm timeedit
Last synced: about 1 month ago
JSON representation
web scraper api to easy get schedule information from timeedit
- Host: GitHub
- URL: https://github.com/richie-south/timeeditapi
- Owner: richie-south
- Created: 2016-07-08T11:40:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-28T09:13:35.000Z (over 9 years ago)
- Last Synced: 2025-12-26T16:37:11.532Z (5 months ago)
- Topics: npm, timeedit
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/timeeditapi
- Size: 12.7 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TimeEditApi
web scraper api to easy get schedule information from timeedit
#### Examples
```javascript
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);
});
```