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 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 |
|---|---|
List<String> |
getAllClasses()
Get a list of all available classes.
|
List<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, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, recognizeType, setCredential, setDebuggingDataHandlerpublic static final 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 IOException, org.json.JSONException, CredentialInvalidException
SubstitutionScheduleParsergetSubstitutionSchedule 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> getAllClasses() throws IOException, org.json.JSONException, CredentialInvalidException
BaseParsergetAllClasses in class BaseParserIOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidExceptionpublic List<String> getAllTeachers() throws IOException, org.json.JSONException, CredentialInvalidException
BaseParsernull.getAllTeachers in class BaseParserIOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationCredentialInvalidExceptionpublic boolean isPersonal()
SubstitutionScheduleParsertrue.isPersonal in interface SubstitutionScheduleParserisPersonal in class BaseParser