public class UntisMonitorParser extends UntisCommonParser
Example: Lornsenschule Schleswig
This parser can be accessed using "untis-monitor" for SubstitutionScheduleData.setApi(String).
SubstitutionScheduleData.setData(JSONObject) to configure the parser:
urls (Array of JSONObjects, required)url parameter specifying the URL and a following parameter to set if the parser
should follow HTML meta tag redirects to load multiple pages. If you are using
LoginHandler for a HTTP POST login, the url parameter can also be set to
"loginResponse"
encoding (String, required)classes (Array of Strings, required)website (String, recommended)lastChangeSelector (String, optional)embeddedContentSelector (String, optional)LoginHandler for login-protected schedules
and those specified in UntisCommonParser.colorProvider, cookieProvider, cookieStore, credential, encodingDetector, executor, PARAM_CLASS_REGEX, scheduleData| Constructor and Description |
|---|
UntisMonitorParser(SubstitutionScheduleData scheduleData,
CookieProvider cookieProvider) |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getAllTeachers()
Get a list of all available teachers.
|
SubstitutionSchedule |
getSubstitutionSchedule()
Downloads and parses the substitution schedule
|
getAllClasses, parseSubstitutionTablecontains, getClassesFromJson, getCredential, getInstance, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, recognizeType, setCredentialpublic UntisMonitorParser(SubstitutionScheduleData scheduleData, CookieProvider cookieProvider)
public SubstitutionSchedule getSubstitutionSchedule() throws IOException, org.json.JSONException, CredentialInvalidException
BaseParsergetSubstitutionSchedule in interface SubstitutionScheduleParsergetSubstitutionSchedule in class BaseParserSubstitutionScheduleIOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidException - the supplied credential (BaseParser.setCredential(Credential) is
not correctpublic List<String> getAllTeachers()
BaseParsernull.getAllTeachers in class BaseParser