public class WebUntisParser extends BaseParser
This parser can be accessed using "webuntis" for SubstitutionScheduleData.setApi(String).
Please bear in mind that WebUntis's API does not allow frequent polling, according to this forum post
SubstitutionScheduleData.setData(JSONObject) to configure the parser:
host (String, required)schoolname (String, required)protocol (String, optional, Default: https)UserPasswordAuthenticationData.| Modifier and Type | Field and Description |
|---|---|
static org.joda.time.format.DateTimeFormatter |
DATE_FORMAT |
static java.lang.String |
PARAM_PROTOCOL |
static org.joda.time.format.DateTimeFormatter |
TIME_FORMAT |
colorProvider, cookieProvider, cookieStore, credential, debuggingDataHandler, encodingDetector, executor, PARAM_CLASS_REGEX, scheduleData| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getAllClasses()
Get a list of all available classes.
|
java.util.List<java.lang.String> |
getAllTeachers()
Get a list of all available teachers.
|
SubstitutionSchedule |
getSubstitutionSchedule()
Downloads and parses the substitution schedule
|
boolean |
isPersonal()
Some substitution schedule systems allow the user to only see his "own" substitution schedule depending on the
credentials he enters.
|
contains, getClassesFromJson, getCredential, getInstance, getLastChange, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, recognizeType, setCredential, setDebuggingDataHandlerpublic static final java.lang.String PARAM_PROTOCOL
public static final org.joda.time.format.DateTimeFormatter DATE_FORMAT
public static final org.joda.time.format.DateTimeFormatter TIME_FORMAT
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> getAllClasses()
throws java.io.IOException,
org.json.JSONException,
CredentialInvalidException
BaseParsergetAllClasses in class BaseParserjava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidExceptionpublic java.util.List<java.lang.String> getAllTeachers()
throws java.io.IOException,
org.json.JSONException,
CredentialInvalidException
BaseParsernull.getAllTeachers in class BaseParserjava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidExceptionpublic boolean isPersonal()
SubstitutionScheduleParsertrue.isPersonal in interface SubstitutionScheduleParserisPersonal in class BaseParser