-
Notifications
You must be signed in to change notification settings - Fork 0
Getting school details
Michał Oręziak edited this page Jun 12, 2019
·
1 revision
const {
WARSAW_AFTER_SECONDARY_SCHOOL_URL
} = require('@warsawlo/lava/urls/2019')
const Lava = require('./src/Lava')({
baseURL: WARSAW_AFTER_SECONDARY_SCHOOL_URL
});
(async () => {
const school = new Lava.School({
id: 104
})
await school.load()
school.getDescription()
school.getClasses()
school.getAdditionalInfo()
})()
- Instance of Lava is created
- Instance of School is created. You have to pass object with
id
of school taken from search results. - School website is downloaded under the hood & cheerio object is created.
- You have access to data thru functions such as
getDescription()
,getClasses()
,getAdditionalInfo()