- Features
- Basic Use
- School Search
- Magister Info
- Set necessary data
- Login
- User Info
- Picture
- Appointments
- Homework
- Grades
- Subjects
- Credits
##Features ##
- School search via Magister 6 api
- Login
- Appointments
- Homework
- Grades (with filter)
##Basic Use ##
Use this when you don't know the school's url (or user/password) and want to use functions without being logged in
<?php
require('Magister6.class.php');
$magister = new Magister;
?>
You can also use quick start, by calling the following: (when you know them already)
<?php
require('Magister6.class.php');
$magister = new Magister("school.magister.net", "username", "password", bool autoLogin);
?>
When you use all the parameters you don't need to do "Set necessary data" or "Login"
$magister->findSchool('part of schoolname');
$magister->getMagisterInfo();
Returns current Magister release info (such as versions etc)
$magister->setSchool('https://school.magister.net/');
$magister->setCredentials('Username', 'Password');
The URL is partially fixed by the library, it automaticaly adds a slash to the end if not present and https:// to the front if not present. (Although it's recommended to do this yourself)
$magister->login();
$magister->getUserInfo();
Returns user's profile
$magister->getPicture(int 'width', int 'height', bool 'crop');
Returns user's profile picture in Base64 format (see test.php for example)
$magister->getAppointments('date from', 'date to');
Dates are in the YYYY-MM-DD format
$magister->getHomework('date from', 'date to');
This basically gets all the appointments with content
$magister->getGrades(bool 'filter subject', bool 'active periods', bool 'calculation only', bool 'PTA only');
All parameters are optional, if none are given Magister 6's defaults will be used
$magister->getSubjects();
This returns all the courses the student is attending at the moment
This library is made by Thomas Konings a.k.a. tkon99