A JavaScript implementation of the Magister 6 API.
Quickstart
npm install magister.js
const { default: magister, getSchools } = require('magister.js');
// or with es6 modules:
// import magister, { getSchools } from 'magister.js'
// replace every '<thing>' with your credentials:
getSchools('<schoolname>') // get schools matching '<schoolname>'
.then((schools) => schools[0]) // get the first school
.then((school) => magister({ // login
school,
username: '<username>',
password: '<password>',
}))
.then((m) => { // done logging in, say hi
console.log(`Hey ${m.profileInfo.firstName}!`);
}, (err) => { // something went wrong
console.error('something went wrong:', err);
});
Useful links
Before creating issues
- Update all dependencies with
npm update
- Be sure you haven't made a typo and your code is correct (check the docs)
- Don't create issues which occur in a modified version
Contributing
- Document your code using jsdoc
- Respect and follow the current programming style
- Test your changes with
npm run test
- Check your code style with
npm run lint
- Make sure that your code compiles with babel using
npm run build
- Only commit the
src/
andtest/
directory