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 |
colorProvider, cookieProvider, cookieStore, credential, 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
|
contains, getClassesFromJson, getCredential, getInstance, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, recognizeType, setCredentialpublic static final String PARAM_PROTOCOL
public static final org.joda.time.format.DateTimeFormatter DATE_FORMAT
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> 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 configurationCredentialInvalidException