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, debuggingDataHandler, encodingDetector, executor, PARAM_CLASS_REGEX, scheduleData| Constructor and Description |
|---|
UntisMonitorParser(SubstitutionScheduleData scheduleData,
CookieProvider cookieProvider) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getAllTeachers()
Get a list of all available teachers.
|
SubstitutionSchedule |
getSubstitutionSchedule()
Downloads and parses the substitution schedule
|
getAllClasses, parseSubstitutionTablecontains, getClassesFromJson, getCredential, getInstance, getLastChange, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, isPersonal, recognizeType, setCredential, setDebuggingDataHandlerpublic UntisMonitorParser(SubstitutionScheduleData scheduleData, CookieProvider cookieProvider)
public SubstitutionSchedule getSubstitutionSchedule() throws java.io.IOException, org.json.JSONException, CredentialInvalidException
SubstitutionScheduleParsergetSubstitutionSchedule in interface SubstitutionScheduleParsergetSubstitutionSchedule in class BaseParserSubstitutionSchedulejava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidException - the supplied credential (BaseParser.setCredential(Credential) is
not correctpublic java.util.List<java.lang.String> getAllTeachers()
BaseParsernull.getAllTeachers in class BaseParser