public class IndiwareParser extends BaseParser
This parser can be accessed using "indiware" for SubstitutionScheduleData.setApi(String).
SubstitutionScheduleData.setData(JSONObject) to configure the parser:
urls (Array of Strings, required){date(yyyy-MM-dd)} in the URL. This placeholder will then
be replaced with the dates of the next 7 days.encoding (String, required)classes (Array of Strings, required)embeddedContentSelector (String, optional)LoginHandler for login-protected schedules.| Modifier and Type | Field and Description |
|---|---|
protected org.json.JSONObject |
data |
colorProvider, cookieProvider, cookieStore, credential, debuggingDataHandler, encodingDetector, executor, PARAM_CLASS_REGEX, scheduleData| Constructor and Description |
|---|
IndiwareParser(SubstitutionScheduleData scheduleData,
CookieProvider cookieProvider) |
| 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
|
contains, getClassesFromJson, getCredential, getInstance, getLastChange, httpGet, httpGet, httpPost, httpPost, httpPost, httpPost, isPersonal, recognizeType, setCredential, setDebuggingDataHandlerpublic IndiwareParser(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> getAllClasses()
throws java.io.IOException,
org.json.JSONException
BaseParsergetAllClasses in class BaseParserjava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configurationpublic java.util.List<java.lang.String> getAllTeachers()
throws java.io.IOException,
org.json.JSONException
BaseParsernull.getAllTeachers in class BaseParserjava.io.IOException - Connection or parsing errororg.json.JSONException - Error with the JSON configuration